summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/blocks/bs_form_snippet.html15
-rw-r--r--ishtar_common/templates/ishtar/forms/document.html38
2 files changed, 52 insertions, 1 deletions
diff --git a/ishtar_common/templates/blocks/bs_form_snippet.html b/ishtar_common/templates/blocks/bs_form_snippet.html
index 47779cdc1..74dbadf5c 100644
--- a/ishtar_common/templates/blocks/bs_form_snippet.html
+++ b/ishtar_common/templates/blocks/bs_form_snippet.html
@@ -63,13 +63,26 @@
{% if field.name in form.HEADERS %}
{% if forloop.counter0 %}
</div>{% endif %}
-<h3>{{field.name|from_dict:form.HEADERS|call:'render'}}</h3>
+
+{% if form.current_header %}
+ {{form.current_header|call:'render_end'}}
+{% endif %}
+
+{% with "headers,"|add:field.name as call_arg %}
+{{form|call:call_arg|call:"render"}}
+{% endwith %}
+
<div class="form-row{% if odd %} odd{% endif %}">
{% elif not search and not forloop.counter0 or search and forloop.counter0 == 1 %}
<div class="form-row{% if odd %} odd{% endif %}">
{% endif %}
{% include "blocks/bs_field_snippet.html" %}
{% if forloop.last %}
+
+{% if form.current_header %}
+ {{form.current_header|call:'render_end'}}
+{% endif %}
+
{% if search and forloop.counter0 >= 1 %}
</div>
<div class="modal-footer">
diff --git a/ishtar_common/templates/ishtar/forms/document.html b/ishtar_common/templates/ishtar/forms/document.html
new file mode 100644
index 000000000..38bb3cacf
--- /dev/null
+++ b/ishtar_common/templates/ishtar/forms/document.html
@@ -0,0 +1,38 @@
+{% extends "base.html" %}
+{% load i18n inline_formset table_form %}
+{% block extra_head %}
+{{form.media}}
+{% endblock %}
+
+{% block pre_container %}
+<form enctype="multipart/form-data" action="." method="post"{% if confirm %}
+ onsubmit='return confirm("{{confirm}}");'{% endif %}>{% csrf_token %}
+{% endblock %}
+{% block content %}
+<h2>{{page_name}}</h2>
+<div class='form'>
+ {% for error in form.non_field_errors %}
+ <p>{{ error }}</p>
+ {% endfor %}
+ {% 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>
+{% endblock %}
+