engelsystem/resources/views/admin/user/edit-shirt.twig

54 lines
1.8 KiB
Twig

{% extends "layouts/app.twig" %}
{% import 'macros/base.twig' as m %}
{% import 'macros/form.twig' as f %}
{% block title %}
{{ is_tshirt ? __('user.edit.shirt') : __('user.edit.goodie') }}
{% endblock %}
{% block content %}
<div class="container">
<h1>{{ block('title') }}</h1>
{% include 'layouts/parts/messages.twig' %}
<form method="post">
{{ csrf() }}
<div class="row">
{% if is_tshirt %}
<div class="col-md-6">
{{ f.select('shirt_size', __('user.shirt_size'), config('tshirt_sizes'), {
'selected': userdata.personalData.shirt_size,
}) }}
</div>
{% endif %}
<div class="col-md-6">
{{ f.switch('arrived', __('user.arrived'), {
'checked': userdata.state.arrived,
'disabled': not has_permission_to('admin_arrive'),
}) }}
{% if userdata.state.force_active %}
{{ f.switch('force_active', __('user.force_active'), {
'checked': true,
'disabled': true,
}) }}
{% endif %}
{{ f.switch('active', __('user.active'), {
'checked': userdata.state.active,
}) }}
{{ f.switch('got_shirt', is_tshirt ? __('user.got_shirt') : __('user.got_goodie'), {
'checked': userdata.state.got_shirt,
}) }}
</div>
<div class="col-md-12">
{{ f.submit(__('form.save')) }}
</div>
</div>
</form>
</div>
{% endblock %}