[TWIG] Display errors in templates that display forms with form_start

This commit is contained in:
Hugo Sales 2022-01-04 19:05:06 +00:00
parent 0758d6145b
commit 5cfed3d536
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
4 changed files with 19 additions and 15 deletions

View File

@ -14,22 +14,23 @@
{# Since the form is not separated into individual groups, this happened #}
{{ form_start(edit_feeds) }}
{{ form_errors(edit_feeds) }}
{% for child in edit_feeds.children %}
{% if 'row_url' in child.vars.block_prefixes %}
<div class="section-widget section-padding">
{{ form_label(child) }}
{{ form_widget(child) }}
{% elseif 'row_title' in child.vars.block_prefixes %}
{{ form_label(child) }}
{{ form_widget(child) }}
{% elseif 'row_order' in child.vars.block_prefixes %}
{{ form_label(child) }}
{{ form_widget(child) }}
{% elseif 'row_remove' in child.vars.block_prefixes %}
{{ form_label(child) }}
{{ form_widget(child) }}
</div>
{% endif %}
{% if 'row_url' in child.vars.block_prefixes %}
<div class="section-widget section-padding">
{{ form_label(child) }}
{{ form_widget(child) }}
{% elseif 'row_title' in child.vars.block_prefixes %}
{{ form_label(child) }}
{{ form_widget(child) }}
{% elseif 'row_order' in child.vars.block_prefixes %}
{{ form_label(child) }}
{{ form_widget(child) }}
{% elseif 'row_remove' in child.vars.block_prefixes %}
{{ form_label(child) }}
{{ form_widget(child) }}
</div>
{% endif %}
{% endfor %}
{{ form_end(edit_feeds) }}

View File

@ -13,6 +13,7 @@
{{ form_start(search_form) }}
<section class="section-widget section-form">
{{ form_errors(search_form) }}
{{ form_row(search_form.search_query) }}
{% if actor is not null %}
<details class="section-widget-subtitle-details">

View File

@ -6,6 +6,7 @@
<h1>Reset your password</h1>
{{ form_start(resetForm) }}
{{ form_errors(resetForm) }}
{{ form_row(resetForm.plainPassword) }}
<button class="btn btn-primary">Reset password</button>
{{ form_end(resetForm) }}

View File

@ -12,6 +12,7 @@
<form class="section-form" method="post">
{{ form_start(registration_form) }}
{{ form_errors(registration_form) }}
<fieldset>
<legend class="section-form-legend">{{ "Register" | trans }}</legend>