From ef02103b44b0f4a5ad4b6d6c5208d1f9e384354c Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Wed, 10 Jan 2024 12:26:40 -0500 Subject: [PATCH] LEAF 3428 mod_wf add requestor to step list, add connection options to requestor step --- .../admin/templates/mod_workflow.tpl | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/LEAF_Request_Portal/admin/templates/mod_workflow.tpl b/LEAF_Request_Portal/admin/templates/mod_workflow.tpl index b6bd9f672..e7cfd88ef 100644 --- a/LEAF_Request_Portal/admin/templates/mod_workflow.tpl +++ b/LEAF_Request_Portal/admin/templates/mod_workflow.tpl @@ -1461,7 +1461,7 @@ addEventDialog(currentWorkflow, stepID, params.action); }); const modalEl = document.getElementById('stepInfo_' + stepID); - const interActiveEls = Array.from(modalEl.querySelectorAll('img, button, input')); + const interActiveEls = Array.from(modalEl.querySelectorAll('img, button, input, select')); const first = interActiveEls[0] || null; const last = interActiveEls[interActiveEls.length - 1] || null; if (first !== null && last !== null) { @@ -1681,7 +1681,7 @@ } } const modalEl = document.getElementById('stepInfo_' + stepID); - const interActiveEls = Array.from(modalEl.querySelectorAll('img, button, select')); + const interActiveEls = Array.from(modalEl.querySelectorAll('img, button, input, select')); const first = interActiveEls[0]; const last = interActiveEls[interActiveEls.length - 1]; if (first !== null && last !== null) { @@ -1726,9 +1726,26 @@ $('.workflowStepInfo').css('display', 'none'); $('#stepInfo_' + stepID).html('Loading...'); + const stepKeys = Object.keys(steps); + let step_options = "" + stepKeys.forEach(k => { + step_options += ``; + }); switch (Number(stepID)) { case -1: - $('#stepInfo_' + stepID).html('Request initiator (stepID #: -1)'); + const output = `Request initiator (stepID #: -1) +
+ Options +
+ + +
+
`; + $('#stepInfo_' + stepID).html(output); break; case 0: $('#stepInfo_' + stepID).html('The End. (stepID #: 0)'); @@ -1821,11 +1838,6 @@ } output += '
'; - const stepKeys = Object.keys(steps); - let step_options = "" - stepKeys.forEach(k => { - step_options += ``; - }); output += `
Options
@@ -2229,11 +2241,8 @@ } function buildStepList(steps = {}) { - let output = ''; const stepIDs = Object.keys(steps); - if (stepIDs.length === 0) { - output += ''; - } stepIDs.forEach(id => { output += ``; });