0
0
mirror of https://github.com/kevinpapst/kimai2.git synced 2024-10-31 06:08:11 +00:00
kevinpapst_kimai2/templates/user/access-token.html.twig

20 lines
814 B
Twig

{% extends kimai_context.modalRequest ? 'form.html.twig' : 'base.html.twig' %}
{% import "macros/widgets.html.twig" as widgets %}
{% block main %}
{% set formEditTemplate = kimai_context.modalRequest ? 'default/_form_modal.html.twig' : 'default/_form.html.twig' %}
{% set formOptions = {
'title': (access_token.id is null ? 'create'|trans : 'edit'|trans({}, 'actions')),
'form': form,
'back': path('user_profile_access_token', {'username': user.userIdentifier})
} %}
{% embed formEditTemplate with formOptions %}
{% form_theme form 'form/horizontal.html.twig' %}
{% block form_body %}
{{ form_row(form.name) }}
{{ form_row(form.expiresAt) }}
{{ form_rest(form) }}
{% endblock %}
{% endembed %}
{% endblock %}