Lab as a Service 2.0
[laas.git] / src / templates / resource / steps / host_info.html
1 {% extends "workflow/viewport-element.html" %}
2 {% load staticfiles %}
3
4 {% load bootstrap3 %}
5
6 {% block content %}
7
8 {% if error %}
9 <p>{{error}}</p>
10 {% else %}
11
12
13 <form id="host_meta_form" method="post" action="/wf/workflow/">
14     {% csrf_token %}
15     <table>
16         <thead>
17             <tr>
18                 <th>Type</th>
19                 <th>Name</th>
20             </tr>
21         </thead>
22         <tbody>
23         {% for form in formset %}
24             <tr>
25                 {% for field in form %}
26                     <td>{{field}}</td>
27                 {% endfor %}
28             </tr>
29         {% endfor %}
30     </table>
31     {{formset.management_form}}
32 </form>
33 {% endif %}
34 {% endblock content %}
35
36 {% block onleave %}
37 var formData = $("#host_meta_form").serialize();
38 var req = new XMLHttpRequest();
39 req.open("POST", "/wf/workflow/", false);
40 req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
41 req.onerror = function() { alert("There was a problem submitting the form"); }
42 req.send(formData);
43 {% endblock %}