summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/form.html
blob: c36a2c3c4b30fe19d97b1767d24f7a6fac165da1 (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
{% extends "base.html" %}
{% load i18n inline_formset table_form %}
{% block extra_head %}
{{form.media}}
{% endblock %}
{% block pre_container %}
<form enctype="multipart/form-data"{% if form.SEARCH_AND_SELECT %}
      class='wizard-form' id="wizard-form"{% endif %}
      action="." method="post"{% if confirm %}
      onsubmit='return confirm("{{confirm}}");'{% endif %}>{% csrf_token %}
{% endblock %}
{% block content %}
<h2>{{page_name}}</h2>
<div class='form{% if not form.SEARCH_AND_SELECT %} container{% endif %}'>
    {% bs_form form %}
</div>
{% endblock %}

{% block footer %}
<div id="footer">
    {% if form.SEARCH_AND_SELECT %}
    <p class="confirm-message">{% trans "Search and select an item in the table" %}</p>
    {% endif %}
    <div id='validation-bar' class="row text-center">
        <div class="col-sm">
            <button type="submit" id="submit_form" name='validate'
                    value="validate" class="btn btn-success">
               {% if submit_label %}{{submit_label}}{% else%}{% trans "Validate" %}{% endif %}
            </button>
        </div>
    </div>
    {% include 'ishtar/blocks/footer.html' %}
</div>
</form>
{% if open_url %}
<script language="javascript" type="text/javascript">
$(document).ready(function(){
    {% if open_url %}load_window("{{open_url}}");{% endif %}
});
</script>{% endif %}
{% endblock %}