konova/templates/form/table/generic_table_form.html

38 lines
1.2 KiB
HTML
Raw Permalink Normal View History

2021-07-01 13:36:07 +02:00
{% load i18n %}
{% block head %}
{{ form.media }}
{% endblock %}
{% block body %}
<div class="container">
2021-07-01 13:36:07 +02:00
<h4>
{{ form.form_title }}
</h4>
{% if form.form_caption is not None %}
<small>
{{ form.form_caption|linebreaks }}
</small>
2021-07-01 13:36:07 +02:00
{% endif %}
<form method="post" action="{{ form.action_url }}" {% for attr_key, attr_val in form.form_attrs.items %} {{attr_key}}="{{attr_val}}"{% endfor %}>
2021-07-01 13:36:07 +02:00
{% csrf_token %}
{% include 'form/table/generic_table_form_body.html' %}
2021-07-01 13:36:07 +02:00
<div class="row">
<div class="col-6">
{% if form.show_cancel_btn %}
2021-07-01 13:36:07 +02:00
<a href="{{ form.cancel_redirect }}">
<button class="btn btn-default" type="button" title="{% trans 'Cancel' %}">{% trans 'Cancel' %}</button>
2021-07-01 13:36:07 +02:00
</a>
{% endif %}
2021-07-01 13:36:07 +02:00
</div>
<div class="col-6 d-flex justify-content-end">
<button class="btn btn-default" type="submit" title="{{form.action_btn_label}}">{{form.action_btn_label}}</button>
2021-07-01 13:36:07 +02:00
</div>
</div>
</form>
</div>
{% endblock %}
{% block footer %}
{{ form.media }}
{% endblock %}