aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/snapshot_workflow/steps/meta.html
blob: 7c3e98be33912a1e0ab886a1c637f62022d5f308 (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
{% extends "workflow/viewport-element.html" %}
{% load staticfiles %}

{% load bootstrap4 %}

{% block content %}
{% bootstrap_form_errors form type='non_fields' %}
<div class="p-4">
    <form id="meta_form" action="/wf/workflow/" method="POST" class="form">
    {% csrf_token %}
    <div class="form-group">
    {% bootstrap_field form.name %}
    {% bootstrap_field form.description %}
    </div>
    </form>
</div>
{% endblock content %}

{% block onleave %}
var ajaxForm = $("#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 %}