0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-05-11 12:15:43 +00:00
kevinpapst_kimai2/templates/user/preferences.html.twig

31 lines
1 KiB
Twig

{% extends 'user/layout.html.twig' %}
{% from "macros/widgets.html.twig" import form_errors %}
{% block profile_content %}
{{ form_start(form) }}
{{ form_errors(form) }}
{% for section in sections %}
{% set show = false %}
{% for pref in form.children.preferences|filter(pref => pref.vars.data.section == section) %}
{% if (pref.children|length > 0) %}
{% set show = true %}
{% endif %}
{% endfor %}
{% if show %}
{% embed '@theme/embeds/card.html.twig' %}
{% block box_body %}
{% for pref in form.children.preferences|filter(pref => pref.vars.data.section == section)|sort((a, b) => a.vars.data.order <=> b.vars.data.order) %}
{{ form_widget(pref) }}
{% endfor %}
{% endblock %}
{% endembed %}
{% endif %}
{% endfor %}
<input type="submit" value="{{ 'action.save'|trans }}" class="btn btn-primary" />
{{ form_end(form) }}
{% endblock %}