{% extends 'user/form.html.twig' %} {% import "macros/widgets.html.twig" as widgets %} {% block form_body %}
{% if auth is empty %} {{ widgets.callout('info', 'User has no codes configured for using the Kiosk mode') }} {% else %} {% set unknown = [] %} {% for userAuth in auth %} {% if userAuth.type not in encoders|keys %} {% set unknown = unknown|merge([userAuth.type]) %} {% else %} {% set encoder = encoders[userAuth.type] %} {% set type = encoder.encoder %} {% set name = encoder.title %} {% endif %} {% endfor %}
{{ 'kiosk.barcode_type'|trans }} {{ 'Code'|trans }} {{ 'active'|trans }} {{ 'actions'|trans }}
{{ name }} {% if encoder.barcode %}

{{ userAuth.code }}

{% else %}

{{ userAuth.code }}

{% endif %} {% if userAuth.activity is not null %}

{{ 'activity'|trans }}: {{ widgets.label_activity(userAuth.activity) }} > {{ widgets.label_project(userAuth.activity.project) }} > {{ widgets.label_customer(userAuth.activity.project.customer) }}

{% endif %}
{{ widgets.label_boolean(type in enabled) }} {{ icon('edit') }} {{ icon('trash') }}
{% if unknown is not empty %} {{ widgets.callout('warning', 'Unknown encoder: ' ~ unknown|join(', ')) }} {% endif %} {% endif %}
{% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}