konova/templates/modal/modal_form.html
mipel 6c4ced784b Modal and other tweaks
* removes WIKI_URL, replaces with HELP_LINK since it was the same before as well
* refactors modal form processing (process_request())
   * modal form can now display errors directly inside the modal (as intended by the devs)
   * modals now properly support the GET-POST workflow that is intended by the devs. More information here: https://github.com/trco/django-bootstrap-modal-forms/issues/183
* Improves label-field linking in generic_table_form_body.html
* removes isDeleteForm attribute from modal_form_script.html
2021-08-17 15:27:49 +02:00

28 lines
966 B
HTML

{% load i18n l10n bootstrap4 %}
{% comment %}
A generic modal form template which is based on django-bootstrap-modal-forms package
https://pypi.org/project/django-bootstrap-modal-forms/
{% endcomment %}
<form method="post" action="" {% for attr_key, attr_val in form.form_attrs.items %} {{attr_key}}="{{attr_val}}"{% endfor %}>
{% csrf_token %}
<div class="modal-header">
<h5 class="modal-title">{{form.form_title}}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<article>
{{ form.form_caption }}
</article>
{% include 'form/generic_table_form_body.html' %}
</div>
{% if form.render_submit %}
<div class="modal-footer">
<button type="submit" class="btn btn-default">{% trans 'Continue' %}</button>
</div>
{% endif %}
</form>