Use seperate form dir
This commit is contained in:
parent
b866f48e3b
commit
880ae577bd
3 changed files with 10 additions and 8 deletions
3
src/newsreader/templates/form/errors.html
Normal file
3
src/newsreader/templates/form/errors.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<section class="section form__section form__section--errors">
|
||||
{{ form.non_field_errors }}
|
||||
</section>
|
||||
|
|
@ -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 %}
|
||||
3
src/newsreader/templates/form/title.html
Normal file
3
src/newsreader/templates/form/title.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<section class="section form__header">
|
||||
<h1 class="h1 form__title">{{ title }}</h1>
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue