Use seperate form dir

This commit is contained in:
sonny 2020-05-14 21:08:38 +02:00
parent b866f48e3b
commit 880ae577bd
3 changed files with 10 additions and 8 deletions

View file

@ -0,0 +1,3 @@
<section class="section form__section form__section--errors">
{{ form.non_field_errors }}
</section>

View file

@ -4,20 +4,16 @@
{% csrf_token %}
{% if form.non_field_errors %}
<section class="section form__errors">
{{ form.non_field_errors }}
</section>
{% include "form/errors.html" title=title %}
{% endif %}
{% if title %}
<section class="section form__header">
<h1 class="h1 form__title">{{ title }}</h1>
</section>
{% include "form/title.html" title=title %}
{% endif %}
<section class="section form__section">
{% for field in form %}
<fieldset class="form__fieldset">
<fieldset class="fieldset form__fieldset">
<label class="label form__label" for="{{ field.name }}">
{{ field.label }}
</label>
@ -30,7 +26,7 @@
</section>
<section class="section form__section--last">
<fieldset class="form__fieldset">
<fieldset class="fieldset form__fieldset">
{% if cancel_url %}
<a class="link button button--cancel" href="{{ cancel_url }}">{% trans "Cancel" %}</a>
{% endif %}

View file

@ -0,0 +1,3 @@
<section class="section form__header">
<h1 class="h1 form__title">{{ title }}</h1>
</section>