Merge "Fixes a typo"
[pharos-tools.git] / dashboard / src / templates / config_bundle / steps / pick_installer.html
1 {% extends "workflow/viewport-element.html" %}
2 {% load staticfiles %}
3
4 {% load bootstrap4 %}
5
6 {% block content %}
7
8 {% if unavailable %}
9 <h1>Please choose a config bundle first</h1>
10 {% else %}
11
12 <form id="installer_form" action="/wf/workflow/" method="POST" id="installer_config_form" class="form">
13     {% csrf_token %}
14     <p>Choose your installer:</p>
15     {% bootstrap_field form.installer %}
16     <p>Choose your scenario:</p>
17     {% bootstrap_field form.scenario %}
18 </form>
19
20 {% endif %}
21
22 {% endblock content %}
23
24 {% block onleave %}
25 var form = $("#installer_form");
26 var formData = form.serialize();
27 var req = new XMLHttpRequest();
28 req.open("POST", "/wf/workflow/", false);
29 req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
30 req.onerror = function() { alert("problem with form submission"); }
31 req.send(formData);
32 {% endblock %}