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

49 lines
1.8 KiB
Twig
Raw Normal View History

2022-12-08 17:40:24 +01:00
{% extends "layouts/app.twig" %}
{% import 'macros/base.twig' as m %}
{% import 'macros/form.twig' as f %}
2023-11-24 16:20:12 +01:00
{% block title %}{{ is_edit ? __('worklog.edit') : __('worklog.add') }}{% endblock %}
2022-12-08 17:40:24 +01:00
{% block content %}
<div class="container">
<h1>
2024-05-21 19:05:33 +02:00
{{ m.button(m.icon('chevron-left'), url('/users', {action: 'view', user_id: userdata.id}), {'size': 'sm', 'title': __('general.back')}) }}
{{ block('title') }}
</h1>
2022-12-08 17:40:24 +01:00
{% include 'layouts/parts/messages.twig' %}
<form method="post">
{{ csrf() }}
<div class="row g-2">
<div class="col-12">
<div>
2023-10-22 18:37:29 +02:00
<label class="form-label">{{ __('general.user') }}</label>
2022-12-08 17:40:24 +01:00
</div>
{{ m.user(userdata, {'pronoun': true}) }}
2022-12-08 17:40:24 +01:00
</div>
<div class="col-12">
{{ f.input('work_date', __('worklog.date'), {
'type': 'date',
'value': work_date.format('Y-m-d'),
'required': true,
}) }}
{{ f.input('work_hours', __('worklog.hours'), {
'type': 'number',
'value': work_hours,
'required': true,
'step': '0.01',
'min': 0,
}) }}
{{ f.input('comment', __('worklog.comment'), {
'value': comment,
'required': true,
'max_length': 200,
}) }}
{{ f.submit(__('form.save'), {'icon_left': 'save'}) }}
2022-12-08 17:40:24 +01:00
</div>
</div>
</form>
</div>
{% endblock %}