2021-07-01 13:36:07 +02:00
|
|
|
{% load i18n %}
|
|
|
|
|
|
|
|
{% block head %}
|
|
|
|
{{ form.media }}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block body %}
|
2021-07-09 07:46:20 +02:00
|
|
|
<div class="container">
|
2021-07-01 13:36:07 +02:00
|
|
|
<h4>
|
|
|
|
{{ form.form_title }}
|
|
|
|
</h4>
|
|
|
|
{% if form.form_caption is not None %}
|
2021-07-09 07:46:20 +02:00
|
|
|
<small>
|
2021-07-01 13:36:07 +02:00
|
|
|
{{ form.form_caption }}
|
2021-07-09 07:46:20 +02:00
|
|
|
</small>
|
2021-07-01 13:36:07 +02:00
|
|
|
{% endif %}
|
|
|
|
<form method="post" action="{{ form.action_url }}">
|
|
|
|
{% csrf_token %}
|
2021-07-09 07:46:20 +02:00
|
|
|
<table class="table">
|
2021-07-01 13:36:07 +02:00
|
|
|
<tbody>
|
|
|
|
{% for field in form %}
|
|
|
|
<tr title="{{ field.help_text }}" class="{% if field.errors %}error{% endif %}">
|
2021-07-09 07:46:20 +02:00
|
|
|
<th scope="row" class="col-sm-3">
|
2021-07-01 13:36:07 +02:00
|
|
|
<div>{{ field.label }}<span class="label-required">{% if field.field.required %}*{% endif %}</span></div>
|
|
|
|
<small>{{ field.help_text }}</small>
|
|
|
|
</th>
|
2021-07-09 07:46:20 +02:00
|
|
|
<td class="col-sm-9">
|
2021-07-01 13:36:07 +02:00
|
|
|
{{ field }}
|
|
|
|
{% for error in field.errors %}
|
2021-07-09 07:46:20 +02:00
|
|
|
<strong>{{ error }}</strong>
|
2021-07-01 13:36:07 +02:00
|
|
|
{% endfor %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-07-09 07:46:20 +02:00
|
|
|
<small>{% trans 'Fields with * are required.' %}</small>
|
2021-07-01 13:36:07 +02:00
|
|
|
<div class="row">
|
2021-07-09 07:46:20 +02:00
|
|
|
<div class="col-md">
|
2021-07-01 13:36:07 +02:00
|
|
|
<a href="{{ form.cancel_redirect }}">
|
2021-07-09 07:46:20 +02:00
|
|
|
<button class="btn btn-default" type="button" title="{% trans 'Cancel' %}">{% trans 'Cancel' %}</button>
|
2021-07-01 13:36:07 +02:00
|
|
|
</a>
|
|
|
|
</div>
|
2021-07-09 07:46:20 +02:00
|
|
|
<div class="col-md d-flex justify-content-end">
|
|
|
|
<button class="btn btn-default" type="submit" title="{% trans 'Save' %}">{% trans 'Save' %}</button>
|
2021-07-01 13:36:07 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block footer %}
|
|
|
|
{{ form.media }}
|
|
|
|
{% endblock %}
|