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/base.html | 35 +-- 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 - src/templates/resource/steps/pod_definition.html | 3 - src/templates/workflow/confirm.html | 97 +------- src/templates/workflow/viewport-base.html | 268 +-------------------- src/templates/workflow/viewport-element.html | 36 --- 9 files changed, 31 insertions(+), 480 deletions(-) (limited to 'src/templates') diff --git a/src/templates/base.html b/src/templates/base.html index 891e0fc..f59740d 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -6,30 +6,7 @@ - + {% endblock %} {% block basecontent %} @@ -107,19 +84,19 @@ Express Booking - + Book a Pod - + Design a Pod - + Configure a Pod - + Create a Snapshot - + Configure OPNFV 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" %} -
- +
@@ -86,240 +54,24 @@
{% csrf_token %} - + + +
-
+ {% csrf_token %}
diff --git a/src/templates/workflow/viewport-element.html b/src/templates/workflow/viewport-element.html index bf13304..d16c924 100644 --- a/src/templates/workflow/viewport-element.html +++ b/src/templates/workflow/viewport-element.html @@ -5,42 +5,6 @@ {% block content %} {% endblock content %} - {% block vport_comm %} - - - {% endblock vport_comm %} - {% block validate_step %} - - - {% endblock validate_step %}
{% block element_messages %} -- cgit 1.2.3-korg