2022-10-03 18:58:04 +02:00
|
|
|
{% extends 'pages/settings/settings.twig' %}
|
|
|
|
{% import 'macros/form.twig' as f %}
|
|
|
|
{% import 'macros/base.twig' as m %}
|
|
|
|
|
2022-10-24 14:59:34 +02:00
|
|
|
{% block title %}{{ __('settings.profile') }}{% endblock %}
|
2022-10-03 18:58:04 +02:00
|
|
|
|
|
|
|
{% block row_content %}
|
|
|
|
<form action="" enctype="multipart/form-data" method="post">
|
|
|
|
{{ csrf() }}
|
|
|
|
|
|
|
|
<div class="row g-4">
|
2023-01-27 11:19:35 +01:00
|
|
|
<div class="col-12">
|
2022-10-24 14:59:34 +02:00
|
|
|
<strong class="help-block">
|
|
|
|
{{ f.entry_required() }} = {{ __('settings.profile.entry_required') }}
|
|
|
|
</strong>
|
|
|
|
</div>
|
2023-04-01 18:15:29 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row g-4">
|
2023-01-27 11:19:35 +01:00
|
|
|
<div class="col-lg-6">
|
2023-10-03 21:34:03 +02:00
|
|
|
{{ f.input('nick', __('general.nick'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'value': userdata.name,
|
2023-04-19 22:34:08 +02:00
|
|
|
'disabled': true,
|
|
|
|
}) }}
|
2023-01-27 11:19:35 +01:00
|
|
|
</div>
|
|
|
|
{% if config('enable_pronoun') %}
|
|
|
|
<div class="col-lg-6">
|
2023-04-19 22:34:08 +02:00
|
|
|
{{ f.input('pronoun', __('settings.profile.pronoun'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'value': userdata.personalData.pronoun,
|
2023-04-19 22:34:08 +02:00
|
|
|
'max_length': 15,
|
2023-11-03 15:15:44 +01:00
|
|
|
'required': isPronounRequired,
|
|
|
|
'required_icon': isPronounRequired,
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
2022-10-03 18:58:04 +02:00
|
|
|
{{ m.info(__('settings.profile.pronoun.info')) }}
|
2023-01-27 11:19:35 +01:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-04-01 18:15:29 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% if config('enable_user_name') %}
|
|
|
|
<div class="row g-4">
|
2023-01-27 11:19:35 +01:00
|
|
|
<div class="col-sm-6">
|
2023-04-19 22:34:08 +02:00
|
|
|
{{ f.input('first_name', __('settings.profile.firstname'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'value': userdata.personalData.first_name,
|
2023-04-19 22:34:08 +02:00
|
|
|
'max_length': 64,
|
2023-11-03 15:15:44 +01:00
|
|
|
'required': isFirstnameRequired,
|
|
|
|
'required_icon': isFirstnameRequired,
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
2023-01-27 11:19:35 +01:00
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
2023-04-19 22:34:08 +02:00
|
|
|
{{ f.input('last_name', __('settings.profile.lastname'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'value': userdata.personalData.last_name,
|
2023-04-19 22:34:08 +02:00
|
|
|
'max_length': 64,
|
2023-11-03 15:15:44 +01:00
|
|
|
'required': isLastnameRequired,
|
|
|
|
'required_icon': isLastnameRequired,
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
2023-01-27 11:19:35 +01:00
|
|
|
</div>
|
2023-04-01 18:15:29 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-10-03 18:58:04 +02:00
|
|
|
|
2023-04-01 18:15:29 +02:00
|
|
|
{% if config('enable_planned_arrival') %}
|
|
|
|
<div class="row g-4">
|
2023-01-27 11:19:35 +01:00
|
|
|
<div class="col-sm-6">
|
2024-03-24 16:43:25 +01:00
|
|
|
{% set planned_arrival_date = userdata.personalData.planned_arrival_date %}
|
2023-04-19 22:34:08 +02:00
|
|
|
{{ f.input('planned_arrival_date', __('settings.profile.planned_arrival_date'), {
|
|
|
|
'type': 'date',
|
2023-08-10 11:33:45 +02:00
|
|
|
'value': planned_arrival_date ? planned_arrival_date.format('Y-m-d') : '',
|
2023-04-19 22:34:08 +02:00
|
|
|
'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') : '',
|
|
|
|
}) }}
|
2023-01-27 11:19:35 +01:00
|
|
|
</div>
|
|
|
|
<div class="col-sm-6">
|
2024-03-24 16:43:25 +01:00
|
|
|
{% set planned_departure_date = userdata.personalData.planned_departure_date %}
|
2023-04-19 22:34:08 +02:00
|
|
|
{{ 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') : '',
|
|
|
|
}) }}
|
2022-10-03 18:58:04 +02:00
|
|
|
</div>
|
2023-04-01 18:15:29 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-10-03 18:58:04 +02:00
|
|
|
|
2023-04-01 18:15:29 +02:00
|
|
|
<div class="row g-4">
|
2023-01-27 11:19:35 +01:00
|
|
|
{% if config('enable_dect') %}
|
|
|
|
<div class="col-md-6">
|
2023-10-02 16:15:25 +02:00
|
|
|
{{ f.input('dect', __('general.dect'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'value': userdata.contact.dect,
|
2023-04-19 22:34:08 +02:00
|
|
|
'max_length': 40,
|
2023-11-03 15:15:44 +01:00
|
|
|
'required': isDectRequired,
|
|
|
|
'required_icon': isDectRequired,
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
2023-01-27 11:19:35 +01:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="col-md-6">
|
2023-04-19 22:34:08 +02:00
|
|
|
{{ f.input('mobile', __('settings.profile.mobile'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'value': userdata.contact.mobile,
|
2023-04-19 22:34:08 +02:00
|
|
|
'max_length': 40,
|
2023-11-03 15:15:44 +01:00
|
|
|
'required': isMobileRequired,
|
|
|
|
'required_icon': isMobileRequired,
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
2022-10-20 21:44:58 +02:00
|
|
|
{% if config('enable_mobile_show') %}
|
2023-04-19 22:34:08 +02:00
|
|
|
{{ f.checkbox('mobile_show', __('settings.profile.mobile_show'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'checked': userdata.settings.mobile_show,
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
2022-10-20 21:44:58 +02:00
|
|
|
{% endif %}
|
2023-01-27 11:19:35 +01:00
|
|
|
</div>
|
2023-04-01 18:15:29 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row g-4">
|
2023-01-27 11:19:35 +01:00
|
|
|
<div class="col-md-6">
|
2023-10-03 21:34:03 +02:00
|
|
|
{{ f.input('email', __('general.email'), {
|
2023-04-19 22:34:08 +02:00
|
|
|
'type': 'email',
|
2024-03-24 16:43:25 +01:00
|
|
|
'value': userdata.email,
|
2023-04-19 22:34:08 +02:00
|
|
|
'max_length': 254,
|
|
|
|
'required': true,
|
|
|
|
'required_icon': true,
|
|
|
|
}) }}
|
2022-10-03 18:58:04 +02:00
|
|
|
</div>
|
|
|
|
|
2023-01-27 11:19:35 +01:00
|
|
|
<div class="col-md-6">
|
2023-04-01 14:23:52 +02:00
|
|
|
<label class="form-label">{{ __('settings.profile.email-preferences') }}</label>
|
2023-05-11 16:31:07 +02:00
|
|
|
{{ f.checkbox('email_shiftinfo', __('settings.profile.email_shiftinfo', [config('app_name')]), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'checked': userdata.settings.email_shiftinfo,
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
|
|
|
{{ f.checkbox('email_news', __('settings.profile.email_news'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'checked': userdata.settings.email_news,
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
|
|
|
{{ f.checkbox('email_messages', __('settings.profile.email_messages'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'checked': userdata.settings.email_messages,
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
|
|
|
{{ f.checkbox('email_human', __('settings.profile.email_by_human_allowed'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'checked': userdata.settings.email_human,
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
2023-03-05 03:00:38 +01:00
|
|
|
{% if goodie_enabled %}
|
2022-10-13 20:23:22 +02:00
|
|
|
{% set privacy_email = config('privacy_email') %}
|
2024-03-27 21:05:44 +01:00
|
|
|
{% set email_goody_label =
|
|
|
|
(goodie_tshirt ? __('settings.profile.email_tshirt') : __('settings.profile.email_goody')) ~
|
2022-10-13 20:23:22 +02:00
|
|
|
(privacy_email ? ' ' ~ __('settings.profile.privacy', [privacy_email]) : '')
|
|
|
|
%}
|
2023-04-19 22:34:08 +02:00
|
|
|
{{ f.checkbox('email_goody', email_goody_label, {
|
2024-03-24 16:43:25 +01:00
|
|
|
'checked': userdata.settings.email_goody,
|
2023-04-19 22:34:08 +02:00
|
|
|
'raw_label': true,
|
|
|
|
}) }}
|
2022-10-03 18:58:04 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2023-04-01 18:15:29 +02:00
|
|
|
</div>
|
2022-10-03 18:58:04 +02:00
|
|
|
|
2023-04-01 18:15:29 +02:00
|
|
|
<div class="row g-4">
|
2023-03-05 03:00:38 +01:00
|
|
|
{% if goodie_tshirt %}
|
2023-01-27 11:19:35 +01:00
|
|
|
<div class="col-12">
|
2023-04-19 22:34:08 +02:00
|
|
|
{{ f.select('shirt_size', __('settings.profile.shirt_size'), config('tshirt_sizes'), {
|
2024-03-24 16:43:25 +01:00
|
|
|
'selected': userdata.personalData.shirt_size,
|
2023-11-03 15:15:44 +01:00
|
|
|
'required': isTShirtSizeRequired,
|
|
|
|
'required_icon': isTShirtSizeRequired,
|
2023-05-11 19:04:07 +02:00
|
|
|
'default_option': __('form.select_placeholder'),
|
2024-03-24 16:43:25 +01:00
|
|
|
'disabled': userdata.state.got_shirt,
|
2023-09-28 12:18:15 +02:00
|
|
|
'info': __('settings.profile.shirt_size.hint'),
|
|
|
|
'raw_form_text': true,
|
|
|
|
'form_text': (tShirtLink ? m.icon('info-circle')
|
|
|
|
~ ' <a href="'
|
|
|
|
~ tShirtLink|escape('html_attr')
|
2024-02-18 11:34:47 +01:00
|
|
|
~ '" target="_blank" rel="noopener">'
|
2023-09-28 12:18:15 +02:00
|
|
|
~ __('settings.profile.shirt.link')|e
|
|
|
|
~ '</a>' : ''),
|
2023-04-19 22:34:08 +02:00
|
|
|
}) }}
|
2022-10-24 14:59:34 +02:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2023-01-27 11:19:35 +01:00
|
|
|
<div class="col-12">
|
2022-10-24 14:59:34 +02:00
|
|
|
{{ m.info(__('settings.profile.angeltypes.info', [url('/angeltypes')]), true) }}
|
2022-10-03 18:58:04 +02:00
|
|
|
</div>
|
|
|
|
|
2023-01-27 11:19:35 +01:00
|
|
|
<div class="col-12">
|
2023-12-21 13:08:29 +01:00
|
|
|
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
|
2022-10-03 18:58:04 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% endblock %}
|