{% extends 'user/form.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% block form_body %}

{{ 'api_password.intro'|trans }}

URL: {{ url('api.swagger_ui', {}, false)|replace({'/doc': ''}) }}

{% if created_token is not null %}
{{ 'status.new'|trans }}

{{ created_token.name }}

{{ 'api_token_hidden'|trans }}

{{ created_token.token }}
{% endif %} {% if access_tokens|length > 0 %} {% for token in access_tokens %} {% endfor %}
{{ 'name'|trans }} {{ 'last_usage'|trans }} {{ 'expires'|trans }}
{{ token.name }} {% if token.lastUsage is not null %} {{ token.lastUsage|date_time }} {% endif %} {% if token.expiresAt is not null %} {{ token.expiresAt|date_short }} {% endif %} {{ widgets.action_button('trash', {'url': path('delete_api_token', {id: token.id}), class: 'api-link', 'attr': { 'data-question': 'confirm.delete', 'data-event': 'kimai.accessToken', 'data-method': 'DELETE', 'data-question': 'confirm.delete', 'data-msg-error': 'action.delete.error', 'data-msg-success': 'action.delete.success' }}) }}
{% endif %} {% embed '@theme/embeds/collapsible.html.twig' with {id: 'activity_invoice_settings'} %} {% import "macros/widgets.html.twig" as widgets %} {% block title %}{{ 'password'|trans }}{% endblock %} {% block box_class %}mt-3{% endblock %} {% block body %} {{ widgets.alert('danger', 'api_password_deprecated'|trans) }} {{ form_start(form) }} {{ form_widget(form) }} {{ form_end(form) }} {% endblock %} {% endembed %}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}