{% extends 'pages/settings/settings.twig' %} {% import 'macros/form.twig' as f %} {% import 'macros/base.twig' as m %} {% block title %}{{ __('settings.profile') }}{% endblock %} {% block row_content %}
{{ csrf() }}
{{ f.entry_required() }} = {{ __('settings.profile.entry_required') }}
{{ f.input('nick', __('general.nick'), { 'value': userdata.name, 'disabled': true, }) }}
{% if config('enable_pronoun') %}
{{ f.input('pronoun', __('settings.profile.pronoun'), { 'value': userdata.personalData.pronoun, 'max_length': 15, 'required': isPronounRequired, 'required_icon': isPronounRequired, }) }} {{ m.info(__('settings.profile.pronoun.info')) }}
{% endif %}
{% if config('enable_user_name') %}
{{ f.input('first_name', __('settings.profile.firstname'), { 'value': userdata.personalData.first_name, 'max_length': 64, 'required': isFirstnameRequired, 'required_icon': isFirstnameRequired, }) }}
{{ f.input('last_name', __('settings.profile.lastname'), { 'value': userdata.personalData.last_name, 'max_length': 64, 'required': isLastnameRequired, 'required_icon': isLastnameRequired, }) }}
{% endif %} {% if config('enable_planned_arrival') %}
{% set planned_arrival_date = userdata.personalData.planned_arrival_date %} {{ f.input('planned_arrival_date', __('settings.profile.planned_arrival_date'), { 'type': 'date', 'value': planned_arrival_date ? planned_arrival_date.format('Y-m-d') : '', 'required': true, 'required_icon': true, 'min': config('buildup_start') ? config('buildup_start').format('Y-m-d') : '', 'max': config('teardown_end') ? config('teardown_end').format('Y-m-d') : '', }) }}
{% set planned_departure_date = userdata.personalData.planned_departure_date %} {{ f.input('planned_departure_date', __('settings.profile.planned_departure_date'), { 'type': 'date', 'value': planned_departure_date ? planned_departure_date.format('Y-m-d') : '', 'min': config('buildup_start') ? config('buildup_start').format('Y-m-d') : '', 'max': config('teardown_end') ? config('teardown_end').format('Y-m-d') : '', }) }}
{% endif %}
{% if config('enable_dect') %}
{{ f.input('dect', __('general.dect'), { 'value': userdata.contact.dect, 'max_length': 40, 'required': isDectRequired, 'required_icon': isDectRequired, }) }}
{% endif %}
{{ f.input('mobile', __('settings.profile.mobile'), { 'value': userdata.contact.mobile, 'max_length': 40, 'required': isMobileRequired, 'required_icon': isMobileRequired, }) }} {% if config('enable_mobile_show') %} {{ f.checkbox('mobile_show', __('settings.profile.mobile_show'), { 'checked': userdata.settings.mobile_show, }) }} {% endif %}
{{ f.input('email', __('general.email'), { 'type': 'email', 'value': userdata.email, 'max_length': 254, 'required': true, 'required_icon': true, }) }}
{{ f.checkbox('email_shiftinfo', __('settings.profile.email_shiftinfo', [config('app_name')]), { 'checked': userdata.settings.email_shiftinfo, }) }} {{ f.checkbox('email_news', __('settings.profile.email_news'), { 'checked': userdata.settings.email_news, }) }} {{ f.checkbox('email_messages', __('settings.profile.email_messages'), { 'checked': userdata.settings.email_messages, }) }} {{ f.checkbox('email_human', __('settings.profile.email_by_human_allowed'), { 'checked': userdata.settings.email_human, }) }} {% if goodie_enabled %} {% set privacy_email = config('privacy_email') %} {% set email_goody_label = __('settings.profile.email_goody') ~ (privacy_email ? ' ' ~ __('settings.profile.privacy', [privacy_email]) : '') %} {{ f.checkbox('email_goody', email_goody_label, { 'checked': userdata.settings.email_goody, 'raw_label': true, }) }} {% endif %}
{% if goodie_tshirt %}
{{ f.select('shirt_size', __('settings.profile.shirt_size'), config('tshirt_sizes'), { 'selected': userdata.personalData.shirt_size, 'required': isTShirtSizeRequired, 'required_icon': isTShirtSizeRequired, 'default_option': __('form.select_placeholder'), 'disabled': userdata.state.got_shirt, 'info': __('settings.profile.shirt_size.hint'), 'raw_form_text': true, 'form_text': (tShirtLink ? m.icon('info-circle') ~ ' ' ~ __('settings.profile.shirt.link')|e ~ '' : ''), }) }}
{% endif %}
{{ m.info(__('settings.profile.angeltypes.info', [url('/angeltypes')]), true) }}
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
{% endblock %}