mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-14 06:59:30 +00:00
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
66 lines
3 KiB
Twig
66 lines
3 KiB
Twig
{% extends "main_card.html.twig" %}
|
|
{% macro genId(widget) %}{{ widget.vars.full_name }}{% endmacro %}
|
|
|
|
{% form_theme form "form/settings_form.html.twig" %}
|
|
|
|
{% block title %}{% trans %}settings.title{% endtrans %}{% endblock %}
|
|
|
|
{% block card_title %}<i class="fa-solid fa-gears fa-fw"></i> {% trans %}settings.title{% endtrans %}{% endblock %}
|
|
|
|
{% block card_content %}
|
|
{{ form_start(form) }}
|
|
|
|
{# Tabs #}
|
|
<ul class="nav nav-tabs">
|
|
{% for tab_widget in form %}
|
|
{# Create a tab for each compound form #}
|
|
{% if tab_widget.vars.compound ?? false %}
|
|
<li class="nav-item">
|
|
<button type="button" class="nav-link {% if loop.first %}active{% endif %}" aria-current="page" data-bs-toggle="tab"
|
|
id="settings-{{ _self.genId(tab_widget) }}-tab" data-bs-target="#settings-{{ _self.genId(tab_widget) }}-pane"
|
|
>{{ (tab_widget.vars.label ?? tab_widget.vars.name|humanize)|trans }}</button>
|
|
</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{# Panes #}
|
|
<div class="tab-content">
|
|
{% for tab_widget in form %}
|
|
{# Create a tab for each compound form #}
|
|
{% if tab_widget.vars.compound ?? false %}
|
|
<div class="tab-pane fade pt-2 {% if loop.first %}show active{% endif %}" id="settings-{{ _self.genId(tab_widget) }}-pane">
|
|
{{ form_help(tab_widget) }}
|
|
{{ form_errors(tab_widget) }}
|
|
|
|
{% for section_widget in tab_widget %}
|
|
{% set settings_object = section_widget.vars.value %}
|
|
|
|
{% if section_widget.vars.compound ?? false %}
|
|
<fieldset>
|
|
<legend class="offset-3">
|
|
<i class="fa-solid {{ settings_icon(settings_object)|default('fa-sliders') }} fa-fw"></i>
|
|
{{ (section_widget.vars.label ?? section_widget.vars.name|humanize)|trans }}
|
|
</legend>
|
|
<div class="row">
|
|
<div class="offset-sm-3 col mb-3 ps-2">
|
|
<b>{{ form_help(section_widget) }}</b>
|
|
{{ form_errors(section_widget) }}
|
|
</div>
|
|
</div>
|
|
{{ form_widget(section_widget) }}
|
|
</fieldset>
|
|
{% if not loop.last %}
|
|
<hr class="mx-0 mb-2 mt-2">
|
|
{% endif %}
|
|
{% else %} {# If not a compound render as normal row #}
|
|
{{ form_row(section_widget) }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{{ form_end(form) }}
|
|
{% endblock %}
|