{% extends "layouts/app.twig" %} {% import 'macros/base.twig' as m %} {% import 'macros/form.twig' as f %} {% block title %}{{ is_edit ? __('worklog.edit') : __('worklog.add') }}{% endblock %} {% block content %}

{{ m.button(m.icon('chevron-left'), url('/users', {action: 'view', user_id: user.id}), null, 'sm') }} {{ block('title') }}

{% include 'layouts/parts/messages.twig' %}
{{ csrf() }}
{{ m.user(user, {'pronoun': true}) }}
{{ 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')) }}
{% endblock %}