Files
dockerfluxodecaixapro/modules/systemconfig/views/admin/index.twig
T
2026-09-01 10:46:29 -03:00

54 lines
2.8 KiB
Twig
Executable File

{% extends "layouts/dashboard.twig" %}
{% block title %}{{ __('systemconfig.title') }}{% endblock %}
{% block content %}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">{{ __('systemconfig.title') }}</h1>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">{{ __('systemconfig.general_settings') }}</h6>
</div>
<div class="card-body">
<form method="POST" action="{{ url('admin/systemconfig/update') }}">
{{ csrf_field()|raw }}
{% if configs|length > 0 %}
{% for config in configs %}
<div class="mb-3">
<label for="{{ config.system_config_key }}" class="form-label fw-bold">
{{ config.system_config_description ? config.system_config_description : config.system_config_key }}
</label>
{% if config.system_config_type == 'boolean' %}
<select class="form-select" id="{{ config.system_config_key }}" name="{{ config.system_config_key }}">
<option value="1" {% if config.system_config_value == '1' %}selected{% endif %}>{{ __('systemconfig.yes') }}</option>
<option value="0" {% if config.system_config_value == '0' %}selected{% endif %}>{{ __('systemconfig.no') }}</option>
</select>
{% elseif config.system_config_type == 'textarea' %}
<textarea class="form-control" id="{{ config.system_config_key }}" name="{{ config.system_config_key }}" rows="3">{{ config.system_config_value }}</textarea>
{% else %}
<input type="text" class="form-control" id="{{ config.system_config_key }}" name="{{ config.system_config_key }}" value="{{ config.system_config_value }}">
{% endif %}
<div class="form-text text-muted small">{{ __('systemconfig.key') }}: {{ config.system_config_key }}</div>
</div>
{% endfor %}
{% else %}
<div class="alert alert-info">
{{ __('systemconfig.no_configs') }}
</div>
{% endif %}
<div class="mt-4">
<button type="submit" class="btn btn-primary">
<i class="bi bi-save"></i> {{ __('systemconfig.save_changes') }}
</button>
</div>
</form>
</div>
</div>
{% endblock %}