|
|
@ -4,6 +4,7 @@ use Carbon\Carbon;
|
|
|
|
use Engelsystem\Models\Room;
|
|
|
|
use Engelsystem\Models\Room;
|
|
|
|
use Engelsystem\Models\User\User;
|
|
|
|
use Engelsystem\Models\User\User;
|
|
|
|
use Engelsystem\Models\Worklog;
|
|
|
|
use Engelsystem\Models\Worklog;
|
|
|
|
|
|
|
|
use Engelsystem\Renderer\Renderer;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
use Illuminate\Support\Str;
|
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
|
|
|
|
|
|
@ -37,81 +38,84 @@ function User_settings_view(
|
|
|
|
$enable_dect = config('enable_dect');
|
|
|
|
$enable_dect = config('enable_dect');
|
|
|
|
$enable_planned_arrival = config('enable_planned_arrival');
|
|
|
|
$enable_planned_arrival = config('enable_planned_arrival');
|
|
|
|
|
|
|
|
|
|
|
|
return page_with_title(settings_title(), [
|
|
|
|
/** @var Renderer $renderer */
|
|
|
|
msg(),
|
|
|
|
$renderer = app(Renderer::class);
|
|
|
|
div('row', [
|
|
|
|
return $renderer->render(
|
|
|
|
div('col-md-3 settings-menu', [
|
|
|
|
'pages/settings/settings.twig',
|
|
|
|
'<ul class="nav nav-pills nav-stacked">',
|
|
|
|
[
|
|
|
|
'<li class="active"><a href="' . url('/user-settings') . '">' . __('settings.profile') . '</a></li>',
|
|
|
|
'title' => 'settings.profile',
|
|
|
|
'<li><a href="' . url('/settings/password') . '">' . __('settings.password') . '</a></li>',
|
|
|
|
'content' =>
|
|
|
|
'<li><a href="' . url('/settings/oauth') . '">' . __('settings.oauth') . '</a></li>',
|
|
|
|
msg()
|
|
|
|
'</ul>'
|
|
|
|
. div('row', [
|
|
|
|
]),
|
|
|
|
div('col-md-9', [
|
|
|
|
div('col-md-9', [
|
|
|
|
form([
|
|
|
|
heading(__('settings.profile'), 2),
|
|
|
|
form_info('', __('Here you can change your user details.')),
|
|
|
|
form([
|
|
|
|
form_info(entry_required() . ' = ' . __('Entry required!')),
|
|
|
|
form_info('', __('Here you can change your user details.')),
|
|
|
|
form_text('nick', __('Nick'), $user_source->name, true),
|
|
|
|
form_info(entry_required() . ' = ' . __('Entry required!')),
|
|
|
|
$enable_pronoun
|
|
|
|
form_text('nick', __('Nick'), $user_source->name, true),
|
|
|
|
? form_text('pronoun', __('Pronoun'), $personalData->pronoun, false, 15)
|
|
|
|
$enable_pronoun
|
|
|
|
. form_info('', __('Will be shown on your profile page and in angel lists.'))
|
|
|
|
? form_text('pronoun', __('Pronoun'), $personalData->pronoun, false, 15)
|
|
|
|
: '',
|
|
|
|
. form_info('', __('Will be shown on your profile page and in angel lists.'))
|
|
|
|
$enable_user_name ? form_text('lastname', __('Last name'), $personalData->last_name) : '',
|
|
|
|
: '',
|
|
|
|
$enable_user_name ? form_text('prename', __('First name'), $personalData->first_name) : '',
|
|
|
|
$enable_user_name ? form_text('lastname', __('Last name'), $personalData->last_name) : '',
|
|
|
|
$enable_planned_arrival ? form_date(
|
|
|
|
$enable_user_name ? form_text('prename', __('First name'), $personalData->first_name) : '',
|
|
|
|
'planned_arrival_date',
|
|
|
|
$enable_planned_arrival ? form_date(
|
|
|
|
__('Planned date of arrival') . ' ' . entry_required(),
|
|
|
|
'planned_arrival_date',
|
|
|
|
$personalData->planned_arrival_date
|
|
|
|
__('Planned date of arrival') . ' ' . entry_required(),
|
|
|
|
? $personalData->planned_arrival_date->getTimestamp()
|
|
|
|
$personalData->planned_arrival_date ? $personalData->planned_arrival_date->getTimestamp() : '',
|
|
|
|
: '',
|
|
|
|
$buildup_start_date,
|
|
|
|
$buildup_start_date,
|
|
|
|
$teardown_end_date
|
|
|
|
$teardown_end_date
|
|
|
|
) : '',
|
|
|
|
) : '',
|
|
|
|
$enable_planned_arrival ? form_date(
|
|
|
|
$enable_planned_arrival ? form_date(
|
|
|
|
'planned_departure_date',
|
|
|
|
'planned_departure_date',
|
|
|
|
__('Planned date of departure'),
|
|
|
|
__('Planned date of departure'),
|
|
|
|
$personalData->planned_departure_date ? $personalData->planned_departure_date->getTimestamp() : '',
|
|
|
|
$personalData->planned_departure_date
|
|
|
|
$buildup_start_date,
|
|
|
|
? $personalData->planned_departure_date->getTimestamp()
|
|
|
|
$teardown_end_date
|
|
|
|
: '',
|
|
|
|
) : '',
|
|
|
|
$buildup_start_date,
|
|
|
|
$enable_dect ? form_text('dect', __('DECT'), $user_source->contact->dect) : '',
|
|
|
|
$teardown_end_date
|
|
|
|
form_text('mobile', __('Mobile'), $user_source->contact->mobile),
|
|
|
|
) : '',
|
|
|
|
form_text('mail', __('E-Mail') . ' ' . entry_required(), $user_source->email),
|
|
|
|
$enable_dect ? form_text('dect', __('DECT'), $user_source->contact->dect) : '',
|
|
|
|
form_checkbox(
|
|
|
|
form_text('mobile', __('Mobile'), $user_source->contact->mobile),
|
|
|
|
'email_shiftinfo',
|
|
|
|
form_text('mail', __('E-Mail') . ' ' . entry_required(), $user_source->email),
|
|
|
|
__(
|
|
|
|
form_checkbox(
|
|
|
|
'The %s is allowed to send me an email (e.g. when my shifts change)',
|
|
|
|
'email_shiftinfo',
|
|
|
|
[config('app_name')]
|
|
|
|
__(
|
|
|
|
),
|
|
|
|
'The %s is allowed to send me an email (e.g. when my shifts change)',
|
|
|
|
$user_source->settings->email_shiftinfo
|
|
|
|
[config('app_name')]
|
|
|
|
),
|
|
|
|
),
|
|
|
|
form_checkbox(
|
|
|
|
$user_source->settings->email_shiftinfo
|
|
|
|
'email_by_human_allowed',
|
|
|
|
),
|
|
|
|
__('Humans are allowed to send me an email (e.g. for ticket vouchers)'),
|
|
|
|
form_checkbox(
|
|
|
|
$user_source->settings->email_human
|
|
|
|
'email_by_human_allowed',
|
|
|
|
),
|
|
|
|
__('Humans are allowed to send me an email (e.g. for ticket vouchers)'),
|
|
|
|
$enable_tshirt_size ? form_select(
|
|
|
|
$user_source->settings->email_human
|
|
|
|
'tshirt_size',
|
|
|
|
),
|
|
|
|
__('Shirt size'),
|
|
|
|
$enable_tshirt_size ? form_select(
|
|
|
|
$tshirt_sizes,
|
|
|
|
'tshirt_size',
|
|
|
|
$personalData->shirt_size,
|
|
|
|
__('Shirt size'),
|
|
|
|
__('Please select...')
|
|
|
|
$tshirt_sizes,
|
|
|
|
) : '',
|
|
|
|
$personalData->shirt_size,
|
|
|
|
form_info('', __('Please visit the angeltypes page to manage your angeltypes.')),
|
|
|
|
__('Please select...')
|
|
|
|
form_submit('submit', __('Save'))
|
|
|
|
) : '',
|
|
|
|
]),
|
|
|
|
form_info('', __('Please visit the angeltypes page to manage your angeltypes.')),
|
|
|
|
form([
|
|
|
|
form_submit('submit', __('Save'))
|
|
|
|
form_info(__('Here you can choose your color settings:')),
|
|
|
|
]),
|
|
|
|
form_select('theme', __('Color settings:'), $themes, $user_source->settings->theme),
|
|
|
|
form([
|
|
|
|
form_submit('submit_theme', __('Save'))
|
|
|
|
form_info(__('Here you can choose your color settings:')),
|
|
|
|
]),
|
|
|
|
form_select('theme', __('Color settings:'), $themes, $user_source->settings->theme),
|
|
|
|
form([
|
|
|
|
form_submit('submit_theme', __('Save'))
|
|
|
|
form_info(__('Here you can choose your language:')),
|
|
|
|
]),
|
|
|
|
form_select('language', __('Language:'), $locales, $user_source->settings->language),
|
|
|
|
form([
|
|
|
|
form_submit('submit_language', __('Save'))
|
|
|
|
form_info(__('Here you can choose your language:')),
|
|
|
|
]),
|
|
|
|
form_select('language', __('Language:'), $locales, $user_source->settings->language),
|
|
|
|
])
|
|
|
|
form_submit('submit_language', __('Save'))
|
|
|
|
])
|
|
|
|
]),
|
|
|
|
], true);
|
|
|
|
])
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|