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

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

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

{{ __('page.sign-up.login-data') }}

{% if isPronounEnabled %}
{{ f.input( 'pronoun', __('settings.profile.pronoun'), { 'max_length': 15, '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, } ) }}
{{ f.input( "password_confirmation", __('settings.password.new_password2'), { 'type': 'password', 'autocomplete': 'new-password', 'required': true, 'required_icon': true, } ) }}
{% 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, 'value': f.formData('firstname', ''), } ) }}
{{ f.input( 'lastname', __('settings.profile.lastname'), { 'autocomplete': 'family-name', 'max_length': 64, 'value': f.formData('lastname', ''), } ) }}
{% endif %}

{{ __('page.sign-up.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': true, 'required_icon': true, 'selected': f.formData('tshirt_size', ''), } ) }}
{% endif %}
{{ f.input( 'mobile', __('settings.profile.mobile'), { 'type': 'tel-national', 'max_length': 40, '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, 'value': f.formData('dect', ''), } ) }}
{% endif %}

{{ __('page.sign-up.what-do-you-want-to-do') }}

{% for angelType in angelTypes %}
{{ f.checkbox( 'angel_types_' ~ angelType.id, angelType.name ~ (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(__('page.sign-up.sign-up'), { 'name': 'register-submit', }) }}
{% endblock %}