From 7cb4c3f79394a59e0276510261550ca6bb3a4fdf Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Tue, 2 Jul 2019 13:27:43 -0400 Subject: Remove onleave + make form id's consistent Change-Id: If167ae98226adfccfcfe2baa356370454a9931b4 Signed-off-by: Sawyer Bergeron --- src/templates/resource/steps/define_hardware.html | 10 +--------- src/templates/resource/steps/host_info.html | 11 +---------- src/templates/resource/steps/meta_info.html | 12 +----------- src/templates/resource/steps/pod_definition.html | 2 +- 4 files changed, 4 insertions(+), 31 deletions(-) (limited to 'src/templates/resource/steps') diff --git a/src/templates/resource/steps/define_hardware.html b/src/templates/resource/steps/define_hardware.html index 57078e9..33a7d8e 100644 --- a/src/templates/resource/steps/define_hardware.html +++ b/src/templates/resource/steps/define_hardware.html @@ -9,16 +9,8 @@ As you make your selections, labs and hosts that are not compatible with your current configuration will become unavailable.

NOTE: Only PTL's are able to create multi-node PODs. See here for more details

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

No Form

"}}
{% endblock content %} -{% block onleave %} -multi_filter_widget.finish(); -var formData = $("#define_hardware_form").serialize(); -req = new XMLHttpRequest(); -req.open('POST', '/wf/workflow/', false); -req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); -req.send(formData); -{% endblock %} diff --git a/src/templates/resource/steps/host_info.html b/src/templates/resource/steps/host_info.html index bbbafdc..3230d8f 100644 --- a/src/templates/resource/steps/host_info.html +++ b/src/templates/resource/steps/host_info.html @@ -10,7 +10,7 @@ {% else %} -
+ {% csrf_token %} @@ -32,12 +32,3 @@ {% endif %} {% endblock content %} - -{% block onleave %} -var formData = $("#host_meta_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("There was a problem submitting the form"); } -req.send(formData); -{% endblock %} diff --git a/src/templates/resource/steps/meta_info.html b/src/templates/resource/steps/meta_info.html index 62230dc..b6a17a9 100644 --- a/src/templates/resource/steps/meta_info.html +++ b/src/templates/resource/steps/meta_info.html @@ -5,20 +5,10 @@ {% block content %} - + {% csrf_token %}
{% bootstrap_form form field_class="px-4" label_class="px-4 mt-2" %}
{% endblock content %} - -{% block onleave %} -var ajaxForm = $("#resource_meta_form"); -var formData = ajaxForm.serialize(); -req = new XMLHttpRequest(); -req.open("POST", "/wf/workflow/", false); -req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); -req.onerror = function() { alert("problem submitting form"); } -req.send(formData); -{% endblock %} diff --git a/src/templates/resource/steps/pod_definition.html b/src/templates/resource/steps/pod_definition.html index 4c9aa83..8d20b14 100644 --- a/src/templates/resource/steps/pod_definition.html +++ b/src/templates/resource/steps/pod_definition.html @@ -37,7 +37,7 @@ -
+ {% csrf_token %}
-- cgit 1.2.3-korg