aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/resource/steps/meta_info.html
blob: da98267d93bda4d1915578bdf96c98b2d7a1e882 (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
44
45
46
{% extends "workflow/viewport-element.html" %}
{% load staticfiles %}

{% load bootstrap3 %}

{% block content %}

<style>
#resource_meta_form {
    padding: 80px;
    display: grid;
}

#resource_meta_form td > * {
    width: 100%;
    margin-bottom: 20px;
    margin-top: 20px;
}

#resource_meta_form > table > tbody > tr {
    border-bottom: 1px solid #cccccc;
}

#resource_meta_form > table > tbody > tr:last-child {
    border-bottom: none;
}

</style>

<form id="resource_meta_form" method="post" action="/wf/workflow/">
    {% csrf_token %}
    <table>
        {{form}}
    </table>
</form>
{% 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 %}