configstuff

This commit is contained in:
lubiana 2025-06-14 20:21:36 +02:00
parent ca0e7d300d
commit c3411e5754
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
12 changed files with 243 additions and 121 deletions

View file

@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}

View file

@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_system_config_reset', {'id': system_config.id}) }}" onsubmit="return confirm('Are you sure you want to reset this setting to its default value?');">
<input type="hidden" name="_token" value="{{ csrf_token('reset' ~ system_config.id) }}">
<button class="btn">Reset</button>
</form>

View file

@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit System Setting{% endblock %}
{% block body %}
<h1>Edit System Setting: {{ system_config.key.name }}</h1>
{{ include('system_config/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_system_config_index') }}">back to list</a>
{{ include('system_config/_reset_form.html.twig') }}
{% endblock %}

View file

@ -0,0 +1,32 @@
{% extends 'base.html.twig' %}
{% block title %}System Settings{% endblock %}
{% block body %}
<h1>System Settings</h1>
<table class="table">
<thead>
<tr>
<th>Description</th>
<th>Value</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for system_config in system_configs %}
<tr>
<td>{{ system_config.description }}</td>
<td>{{ system_config.value }}</td>
<td>
<a class="btn btn-primary" href="{{ path('app_system_config_edit', {'id': system_config.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}