aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/dashboard/genericselect.html
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-07-02 17:33:09 -0400
committerSawyer Bergeron <sbergeron@iol.unh.edu>2019-07-08 14:32:53 +0000
commitbf45f8f4d05d9842b285013cfcb0a0235ce51c5d (patch)
tree528ceb8bf7627a65ed771ac3738031778e8750c8 /src/templates/dashboard/genericselect.html
parente0b8bb3ee3c218a65562acdc5e76f714aab92926 (diff)
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 <pberberian@iol.unh.edu> Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/templates/dashboard/genericselect.html')
-rw-r--r--src/templates/dashboard/genericselect.html21
1 files changed, 3 insertions, 18 deletions
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 %}
-<div id="{{select_type}}_form_div" class="h-100 border d-flex flex-column p-4">
+<div id="select_form_div" class="h-100 border d-flex flex-column p-4">
<h3 id="create_section">Create a Resource
<button class="btn btn-primary {% if disabled %} disabled {% endif %}"
- {% if not disabled %}onclick="parent.add_wf({{addable_type_num}})"
+ {% if not disabled %}onclick="add_workflow({{addable_type_num}})"
{% endif %}>Here
</button>
</h3>
<div class="border-top"></div>
<h3 id="select_header_section">Or select from the list below:</h3>
<div id="select_section" class="d-flex flex-column">
- <form id="{{select_type}}_select_form" method="post" action=""
- class="form d-flex flex-column" id="{{select_type}}selectorform">
+ <form id="step_form" method="post" action="" class="form d-flex flex-column">
{% csrf_token %}
{{ form|default:"<p>no form loaded</p>" }}
- {% buttons %}
-
- {% endbuttons %}
</form>
</div>
</div>
@@ -33,13 +28,3 @@
</script>
{% 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 %}
-