From 6f0d21ca0cbb2ccd0ec9a1f9eb0b50a8305389cf 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 dashboard/src/templates/dashboard/genericselect.html (limited to 'dashboard/src/templates/dashboard') diff --git a/dashboard/src/templates/dashboard/genericselect.html b/dashboard/src/templates/dashboard/genericselect.html new file mode 100644 index 0000000..fc29ee6 --- /dev/null +++ b/dashboard/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/dashboard/src/templates/dashboard/searchable_select_multiple.html b/dashboard/src/templates/dashboard/searchable_select_multiple.html index c08fbe5..69394ab 100644 --- a/dashboard/src/templates/dashboard/searchable_select_multiple.html +++ b/dashboard/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 @@