0
0
mirror of https://github.com/kevinpapst/kimai2.git synced 2024-12-22 12:18:29 +00:00
kevinpapst_kimai2/templates/timesheet/edit.html.twig

21 lines
858 B
Twig

{% extends kimai_context.modalRequest ? 'form.html.twig' : 'base.html.twig' %}
{% from "macros/widgets.html.twig" import alert %}
{% block main %}
{% if timesheet.exported %}
{{ alert('warning', ('timesheet.locked.warning'|trans({}, 'flashmessages')), null, 'warning') }}
{% endif %}
{% set formOptions = {
'template': kimai_context.modalRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig',
'title': (timesheet.id ? 'timesheet.edit'|trans : 'create'|trans),
'form': form
} %}
{% if route_back is defined and route_back is not null %}
{% set formOptions = formOptions|merge({'back': path(route_back)}) %}
{% endif %}
{% if template is not defined %}
{% set template = 'timesheet/edit-default.html.twig' %}
{% endif %}
{% include template %}
{% endblock %}