From 63bec7d84cbf1acd3a9a357b58b47584b1701229 Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Thu, 23 May 2019 13:30:37 -0400 Subject: Refactor selector step logic Change-Id: I61e361e63da7453b2eee0e0c162a6f4e48460128 Signed-off-by: Sawyer Bergeron --- src/templates/dashboard/genericselect.html | 71 ++++++++++++++++++++++ .../dashboard/searchable_select_multiple.html | 70 +++++++++------------ 2 files changed, 100 insertions(+), 41 deletions(-) create mode 100644 src/templates/dashboard/genericselect.html (limited to 'src/templates/dashboard') diff --git a/src/templates/dashboard/genericselect.html b/src/templates/dashboard/genericselect.html new file mode 100644 index 0000000..fc29ee6 --- /dev/null +++ b/src/templates/dashboard/genericselect.html @@ -0,0 +1,71 @@ +{% extends "workflow/viewport-element.html" %} +{% load staticfiles %} + +{% load bootstrap3 %} + +{% block content %} + + + +
+
+
+
+ {% csrf_token %} + {{ form|default:"

no form loaded

" }} + {% buttons %} + + {% endbuttons %} +
+
+

OR

+
+ +
+
+
+ + +{% endblock content %} +{% block onleave %} +var form = $("#{{select_type}}_select_form"); +var formData = form.serialize(); +var req = new XMLHttpRequest(); +req.open("POST", "/wf/workflow/", false); +req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); +req.onerror = function() { alert("problem with form submission"); } +req.send(formData); +{% endblock %} + diff --git a/src/templates/dashboard/searchable_select_multiple.html b/src/templates/dashboard/searchable_select_multiple.html index c08fbe5..69394ab 100644 --- a/src/templates/dashboard/searchable_select_multiple.html +++ b/src/templates/dashboard/searchable_select_multiple.html @@ -7,9 +7,10 @@

Please make a different selection, as the current config conflicts with the selected pod

{% endif %} - + - - -
@@ -96,16 +89,32 @@