From bf45f8f4d05d9842b285013cfcb0a0235ce51c5d Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Tue, 2 Jul 2019 17:33:09 -0400 Subject: Hacking on AJAX This change incorporates the multiple changes we've made in the past few days in order to actually get AJAX working. Change-Id: Ia61a0395e7dbac26a143ca6e15049e6a4bdc8b0d Signed-off-by: Parker Berberian Signed-off-by: Sawyer Bergeron --- src/templates/dashboard/genericselect.html | 21 ++-------- src/templates/dashboard/landing.html | 46 +++------------------- .../dashboard/multiple_select_filter_widget.html | 3 -- .../dashboard/searchable_select_multiple.html | 2 - 4 files changed, 9 insertions(+), 63 deletions(-) (limited to 'src/templates/dashboard') diff --git a/src/templates/dashboard/genericselect.html b/src/templates/dashboard/genericselect.html index f54cd90..863d33f 100644 --- a/src/templates/dashboard/genericselect.html +++ b/src/templates/dashboard/genericselect.html @@ -1,27 +1,22 @@ {% extends "workflow/viewport-element.html" %} -{% load staticfiles %} {% load bootstrap4 %} {% block content %} -
+

Create a Resource

Or select from the list below:

-
+ {% csrf_token %} {{ form|default:"

no form loaded

" }} - {% buttons %} - - {% endbuttons %}
@@ -33,13 +28,3 @@ {% 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/landing.html b/src/templates/dashboard/landing.html index d4776cc..72f9e6e 100644 --- a/src/templates/dashboard/landing.html +++ b/src/templates/dashboard/landing.html @@ -47,13 +47,13 @@

- +
- +
- +
{% endif %} @@ -65,7 +65,7 @@

If you're a returning user, some of the following options may be of interest:

- -
{% csrf_token %} - - - -
-{% block vport_comm %} -{% endblock %} -{% endblock content %} \ No newline at end of file +{% endblock content %} diff --git a/src/templates/dashboard/multiple_select_filter_widget.html b/src/templates/dashboard/multiple_select_filter_widget.html index 4a65bd9..e97a41b 100644 --- a/src/templates/dashboard/multiple_select_filter_widget.html +++ b/src/templates/dashboard/multiple_select_filter_widget.html @@ -1,6 +1,3 @@ - -
diff --git a/src/templates/dashboard/searchable_select_multiple.html b/src/templates/dashboard/searchable_select_multiple.html index 8299a55..44689da 100644 --- a/src/templates/dashboard/searchable_select_multiple.html +++ b/src/templates/dashboard/searchable_select_multiple.html @@ -1,5 +1,3 @@ - -
{% if incompatible == "true" %}