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 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'src/templates/dashboard/genericselect.html') 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 %} - -- cgit 1.2.3-korg