{% extends 'layouts/app.twig' %} {% import 'macros/base.twig' as m %} {% import 'macros/form.twig' as f %} {% block title %}{{ __('registration.title') }}{% endblock %} {% block content %}

{{ has_permission_to('admin_user') ? m.button(m.icon('chevron-left'), url('/users'), null, 'sm') : '' }} {{ __('registration.title') }}

{% include 'layouts/parts/messages.twig' %}
{{ csrf() }}

{{ __('registration.login_data') }}

{% if isPronounEnabled %}
{{ f.input( 'pronoun', __('settings.profile.pronoun'), { 'max_length': 15, 'required': isPronounRequired, 'required_icon': isPronounRequired, 'value': f.formData('pronoun', ''), } ) }}
{% endif %}
{{ f.input( 'username', __('general.nick'), { 'autocomplete': 'nickname', 'max_length': 24, 'required': true, 'required_icon': true, 'value': f.formData('username', ''), } ) }}
{% if not isPronounEnabled %} {# Insert an empty row to keep password / email in line #}
{% endif %} {% if isPasswordEnabled %}
{{ f.input( 'password', __('settings.password'), { 'type': 'password', 'autocomplete': 'new-password', 'required': true, 'required_icon': true, 'min_length': minPasswordLength, 'info': __('password.minimal_length', [minPasswordLength]), } ) }}
{{ f.input( "password_confirmation", __('settings.password.new_password2'), { 'type': 'password', 'autocomplete': 'new-password', 'required': true, 'required_icon': true, 'min_length': minPasswordLength, } ) }}
{% endif %}
{{ f.input( 'email', __('general.email'), { 'type': 'email', 'max_length': 254, 'required': true, 'required_icon': true, 'value': f.formData('email', ''), } ) }}
  • {# Empty class to prevent the default bottom margin #} {{ f.checkbox( 'email_shiftinfo', __( 'settings.profile.email_shiftinfo', [config('app_name')] ), { 'class': '', 'checked': f.formData('email_shiftinfo', false), }, ) }}
  • {# Empty class to prevent the default bottom margin #} {{ f.checkbox( 'email_news', __('settings.profile.email_news'), { 'class': '', 'checked': f.formData('email_news', false), }, ) }}
  • {# Empty class to prevent the default bottom margin #} {{ f.checkbox( 'email_messages', __('settings.profile.email_messages'), { 'class': '', 'checked': f.formData('email_messages', false), }, ) }}
  • {# Empty class to prevent the default bottom margin #} {{ f.checkbox( 'email_by_human_allowed', __('settings.profile.email_by_human_allowed'), { 'class': '', 'checked': f.formData('email_by_human_allowed', false), }, ) }}
{% if isFullNameEnabled %}

{{ __('general.name') }}

{{ f.input( 'firstname', __('settings.profile.firstname'), { 'autocomplete': 'given-name', 'max_length': 64, 'required': isFirstnameRequired, 'required_icon': isFirstnameRequired, 'value': f.formData('firstname', ''), } ) }}
{{ f.input( 'lastname', __('settings.profile.lastname'), { 'autocomplete': 'family-name', 'max_length': 64, 'required': isLastnameRequired, 'required_icon': isLastnameRequired, 'value': f.formData('lastname', ''), } ) }}
{% endif %}

{{ __('registration.event_data') }}

{% if isGoodieEnabled %}
{% 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, { 'raw_label': true, 'checked': f.formData('email_goody', false), }, ) }}
{% endif %} {% if isPlannedArrivalDateEnabled %}
{{ f.input( 'planned_arrival_date', __('settings.profile.planned_arrival_date'), { 'type': 'date', 'min': buildUpStartDate, 'max': tearDownEndDate, 'required': true, 'required_icon': true, 'value': f.formData('planned_arrival_date', buildUpStartDate), } ) }}
{% endif %} {% if isGoodieTShirt %}
{{ f.select( 'tshirt_size', __('settings.profile.shirt_size'), tShirtSizes, { 'default_option': __('form.select_placeholder'), 'required': isTShirtSizeRequired, 'required_icon': isTShirtSizeRequired, 'selected': f.formData('tshirt_size', ''), } ) }}
{% endif %}
{{ f.input( 'mobile', __('settings.profile.mobile'), { 'type': 'tel-national', 'max_length': 40, 'required': isMobileRequired, 'required_icon': isMobileRequired, 'value': f.formData('mobile', ''), } ) }} {% if isShowMobileEnabled %} {{ f.checkbox( 'mobile_show', __('settings.profile.mobile_show'), { 'raw_label': true, 'checked': f.formData('mobile_show', false), }, ) }} {% endif %}
{% if isDECTEnabled %}
{{ f.input( "dect", __('general.dect'), { 'type': 'tel-local', 'max_length': 40, 'required': isDectRequired, 'required_icon': isDectRequired, 'value': f.formData('dect', ''), } ) }}
{% endif %}

{{ __('registration.what_todo') }}

{% for angelType in angelTypes %}
{{ f.checkbox( 'angel_types_' ~ angelType.id, angelType.name|e ~ (angelType.restricted ? ' ' ~ m.icon('mortarboard-fill', 'text-body') : ''), { 'value': angelType.id, 'raw_label': true, 'checked': preselectedAngelTypes['angel_types_' ~ angelType.id] ?? false, } ) }}
{% endfor %}
{{ m.icon('mortarboard-fill', 'text-body') }} {{ __('angeltypes.restricted.hint') }}
{{ m.icon('info-circle', 'text-body') }} {{ __('angeltypes.can-change-later') }}
{# By assigning a name here, some magicâ„¢ will create a session var "form-data-register-submit" with the value 1 on submit. #} {{ f.submit(__('registration.register'), { 'name': 'register-submit', }) }}
{% endblock %}