include roles and teams in user create form (#2849)

This commit is contained in:
Kevin Papst
2021-11-03 16:24:22 +01:00
committed by GitHub
parent 2bc76e7adc
commit b92488e32f
3 changed files with 85 additions and 0 deletions

View File

@@ -11,6 +11,67 @@
} %}
{% embed formEditTemplate with formOptions %}
{% block form_body %}
<div class="row">
<div class="col-md-5">
{{ form_row(form.username) }}
</div>
<div class="col-md-5">
{{ form_row(form.email) }}
</div>
<div class="col-md-2">
{{ form_row(form.color) }}
</div>
</div>
<div class="row">
<div class="col-md-5">
{{ form_row(form.alias) }}
</div>
<div class="col-md-5">
{{ form_row(form.title) }}
</div>
<div class="col-md-2">
{{ form_row(form.accountNumber) }}
</div>
</div>
<div class="row">
<div class="col-md-6">
{{ form_row(form.plainPassword.first) }}
</div>
<div class="col-md-6">
{{ form_row(form.plainPassword.second) }}
</div>
</div>
<div class="row">
<div class="col-md-6">
{{ form_row(form.language) }}
</div>
<div class="col-md-6">
{{ form_row(form.timezone) }}
</div>
</div>
{% if form.teams is defined or form.roles is defined %}
{% set length = 12 %}
{% if form.teams is defined and form.roles is defined %}
{% set length = 6 %}
{% endif %}
<div class="row">
{% if form.teams is defined %}
<div class="col-md-{{ length }}">
{{ form_row(form.teams) }}
</div>
{% endif %}
{% if form.roles is defined %}
<div class="col-md-{{ length }}">
{{ form_row(form.roles) }}
</div>
{% endif %}
</div>
{% endif %}
{{ form_widget(form) }}
{% endblock %}
{% endembed %}