-
Notifications
You must be signed in to change notification settings - Fork 4
/
workflows.js
54 lines (46 loc) · 1.56 KB
/
workflows.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//-------------------------------------------------------
// Copyright (C) 2019 The Trustees of Indiana University
// SPDX-License-Identifier: BSD-3-Clause
//-------------------------------------------------------
if (typeof RedCapEtlModule === 'undefined') {
var RedCapEtlModule = {};
}
RedCapEtlModule.deleteWorkflow = function (event) {
var workflow = event.data.workflow;
$("#workflow-to-delete").text('"'+workflow+'"');
$('#delete-workflow-name').val(workflow);
$("#delete-form").data('workflow', workflow).dialog("open");
}
RedCapEtlModule.reinstateWorkflow = function (event) {
var workflow = event.data.workflow;
$("#workflow-to-reinstate").text('"'+workflow+'"');
$('#reinstate-workflow-name').val(workflow);
$("#reinstate-form").data('workflow', workflow).dialog("open");
}
$(function() {
"use strict";
// Delete workflow dialog
var deleteForm = $("#delete-form").dialog({
autoOpen: false,
height: 220,
width: 400,
modal: true,
buttons: {
Cancel: function() {$(this).dialog("close");},
"Delete workflow": function() {deleteForm.submit();}
},
title: "Delete workflow"
});
// Reinstate workflow dialog
var reinstateForm = $("#reinstate-form").dialog({
autoOpen: false,
height: 220,
width: 400,
modal: true,
buttons: {
Cancel: function() {$(this).dialog("close");},
"Reinstate workflow": function() {reinstateForm.submit();}
},
title: "Reinstate workflow"
})
});