Removed double hidden check by adding the col_width parameter to form inputs which generates the col div

This commit is contained in:
2023-06-01 14:59:31 +01:00
parent e559d4380b
commit bf9467b480
12 changed files with 134 additions and 156 deletions

View File

@@ -1,44 +1,17 @@
{% extends "@admin/forms/user.html.twig" %}
{% block user_form %}
{% if 'user_name' not in form.fields.hidden %}
<div class="col-sm-6">
{% include "forms/partials/input-user-user_name.html.twig" %}
</div>
{% endif %}
{% include "forms/partials/input-user-user_name.html.twig" with { 'col_width': 'col-sm-6' } %}
{% if 'group' not in form.fields.hidden %}
<div class="col-sm-6">
{% include "forms/partials/input-user-group.html.twig" %}
</div>
{% endif %}
{% include "forms/partials/input-user-group.html.twig" with { 'col_width': 'col-sm-6' } %}
{% if 'name' not in form.fields.hidden %}
<div class="col-sm-6">
{% include "forms/partials/input-user-first_name.html.twig" %}
</div>
<div class="col-sm-6">
{% include "forms/partials/input-user-last_name.html.twig" %}
</div>
{% endif %}
{% include "forms/partials/input-user-name.html.twig" with { 'col_width': 'col-sm-12' } %}
{% if 'email' not in form.fields.hidden %}
<div class="col-sm-6">
{% include "forms/partials/input-user-email.html.twig" %}
</div>
{% endif %}
{% include "forms/partials/input-user-email.html.twig" with { 'col_width': 'col-sm-6' } %}
{% if 'theme' not in form.fields.hidden %}
<div class="col-sm-6">
{% include "forms/partials/input-user-theme.html.twig" %}
</div>
{% endif %}
{% include "forms/partials/input-user-theme.html.twig" with { 'col_width': 'col-sm-6' } %}
{% if 'locale' not in form.fields.hidden %}
<div class="col-sm-6">
{% include "forms/partials/input-user-locale.html.twig" %}
</div>
{% endif %}
{% include "forms/partials/input-user-locale.html.twig" with { 'col_width': 'col-sm-6' } %}
{% if 'password' not in form.fields.hidden %}
{% include "forms/partials/user-set-password.html.twig" %}