aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/resource/steps/host_info.html
blob: 027572708f11f98b21a6f0a21282b4d23929ff70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{% extends "workflow/viewport-element.html" %}
{% load staticfiles %}

{% load bootstrap3 %}

{% block content %}

{% if error %}
<p>{{error}}</p>
{% else %}


<form id="host_meta_form" method="post" action="/wf/workflow/">
    {% csrf_token %}
    <table>
        <thead>
            <tr>
                <th>Type</th>
                <th>Name</th>
            </tr>
        </thead>
        <tbody>
        {% for form in formset %}
            <tr>
                {% for field in form %}
                    <td>{{field}}</td>
                {% endfor %}
            </tr>
        {% endfor %}
    </table>
    {{formset.management_form}}
</form>
{% 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 %}