improve profile layout

This commit is contained in:
Thomas Rupprecht 2023-01-27 11:19:35 +01:00 committed by Igor Scheller
parent 14ff157a12
commit 21d8c27c92
1 changed files with 29 additions and 16 deletions

View File

@ -9,21 +9,24 @@
{{ csrf() }} {{ csrf() }}
<div class="row g-4"> <div class="row g-4">
<div class="col-md-12"> <div class="col-12">
<strong class="help-block"> <strong class="help-block">
{{ f.entry_required() }} = {{ __('settings.profile.entry_required') }} {{ f.entry_required() }} = {{ __('settings.profile.entry_required') }}
</strong> </strong>
</div> </div>
<div class="col-12">
<div class="col-md-12">
{{ m.info(__('settings.profile.user_details.info')) }} {{ m.info(__('settings.profile.user_details.info')) }}
</div>
<div class="col-lg-6">
{{ f.input( {{ f.input(
'nick', 'nick',
__('settings.profile.nick'), __('settings.profile.nick'),
'text', 'text',
{'value': user.name, 'disabled': true} {'value': user.name, 'disabled': true}
) }} ) }}
</div>
{% if config('enable_pronoun') %} {% if config('enable_pronoun') %}
<div class="col-lg-6">
{{ f.input( {{ f.input(
'pronoun', 'pronoun',
__('settings.profile.pronoun'), __('settings.profile.pronoun'),
@ -31,25 +34,29 @@
{'value': user.personalData.pronoun ,'max_length': 15} {'value': user.personalData.pronoun ,'max_length': 15}
) }} ) }}
{{ m.info(__('settings.profile.pronoun.info')) }} {{ m.info(__('settings.profile.pronoun.info')) }}
</div>
{% endif %} {% endif %}
{% if config('enable_user_name') %} {% if config('enable_user_name') %}
<div class="col-sm-6">
{{ f.input( {{ f.input(
'first_name', 'first_name',
__('settings.profile.firstname'), __('settings.profile.firstname'),
'text', 'text',
{'value': user.personalData.first_name, 'max_length': 64} {'value': user.personalData.first_name, 'max_length': 64}
) }} ) }}
</div>
<div class="col-sm-6">
{{ f.input( {{ f.input(
'last_name', 'last_name',
__('settings.profile.lastname'), __('settings.profile.lastname'),
'text', 'text',
{'value': user.personalData.last_name, 'max_length': 64} {'value': user.personalData.last_name, 'max_length': 64}
) }} ) }}
{% endif %}
</div> </div>
{% endif %}
{% if config('enable_planned_arrival') %} {% if config('enable_planned_arrival') %}
<div class="col-md-12"> <div class="col-sm-6">
{{ f.input( {{ f.input(
'planned_arrival_date', 'planned_arrival_date',
__('settings.profile.planned_arrival_date'), __('settings.profile.planned_arrival_date'),
@ -62,6 +69,8 @@
'max': config('teardown_end') ? config('teardown_end').format('Y-m-d') : '', 'max': config('teardown_end') ? config('teardown_end').format('Y-m-d') : '',
} }
) }} ) }}
</div>
<div class="col-sm-6">
{% set planned_departure_date = user.personalData.planned_departure_date %} {% set planned_departure_date = user.personalData.planned_departure_date %}
{{ f.input( {{ f.input(
'planned_departure_date', 'planned_departure_date',
@ -76,15 +85,17 @@
</div> </div>
{% endif %} {% endif %}
<div class="col-md-12">
{% if config('enable_dect') %} {% if config('enable_dect') %}
<div class="col-md-6">
{{ f.input( {{ f.input(
'dect', 'dect',
__('settings.profile.dect'), __('settings.profile.dect'),
'text', 'text',
{'value': user.contact.dect, 'max_length': 40} {'value': user.contact.dect, 'max_length': 40}
) }} ) }}
</div>
{% endif %} {% endif %}
<div class="col-md-6">
{{ f.input( {{ f.input(
'mobile', 'mobile',
__('settings.profile.mobile'), __('settings.profile.mobile'),
@ -98,6 +109,8 @@
user.settings.mobile_show user.settings.mobile_show
) }} ) }}
{% endif %} {% endif %}
</div>
<div class="col-md-6">
{{ f.input( {{ f.input(
'email', 'email',
__('settings.profile.email'), __('settings.profile.email'),
@ -106,7 +119,7 @@
) }} ) }}
</div> </div>
<div class="col-md-12"> <div class="col-md-6">
{{ f.checkbox( {{ f.checkbox(
'email_shiftinfo', 'email_shiftinfo',
__('settings.profile.email_shiftinfo', [config('app_name')]), __('settings.profile.email_shiftinfo', [config('app_name')]),
@ -144,7 +157,7 @@
</div> </div>
{% if goodie_tshirt %} {% if goodie_tshirt %}
<div class="col-md-12"> <div class="col-12">
{{ f.select( {{ f.select(
'shirt_size', 'shirt_size',
config('tshirt_sizes'), config('tshirt_sizes'),
@ -155,11 +168,11 @@
</div> </div>
{% endif %} {% endif %}
<div class="col-md-12"> <div class="col-12">
{{ m.info(__('settings.profile.angeltypes.info', [url('/angeltypes')]), true) }} {{ m.info(__('settings.profile.angeltypes.info', [url('/angeltypes')]), true) }}
</div> </div>
<div class="col-md-12"> <div class="col-12">
{{ f.submit(__('form.save')) }} {{ f.submit(__('form.save')) }}
</div> </div>
</div> </div>