All checks were successful
CI - Build Tonehaus Docker image / tonehaus-ci-build (push) Successful in 1m57s
40 lines
1.8 KiB
Twig
40 lines
1.8 KiB
Twig
{% extends 'base.html.twig' %}
|
|
{% block title %}Site Settings{% endblock %}
|
|
{% block body %}
|
|
<h1 class="h4 mb-3">Site Settings</h1>
|
|
{% for msg in app.flashes('success') %}<div class="alert alert-success">{{ msg }}</div>{% endfor %}
|
|
{% for msg in app.flashes('info') %}<div class="alert alert-info">{{ msg }}</div>{% endfor %}
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
{{ form_start(form, {attr: {class: 'vstack gap-3', novalidate: 'novalidate'}}) }}
|
|
<div>
|
|
{{ form_label(form.SPOTIFY_CLIENT_ID) }}
|
|
{{ form_widget(form.SPOTIFY_CLIENT_ID, {attr: {class: 'form-control'}}) }}
|
|
</div>
|
|
<div>
|
|
{{ form_label(form.SPOTIFY_CLIENT_SECRET) }}
|
|
{{ form_widget(form.SPOTIFY_CLIENT_SECRET, {attr: {class: 'form-control'}}) }}
|
|
</div>
|
|
<div class="form-check form-switch">
|
|
{% set registrationToggleAttrs = {class: 'form-check-input'} %}
|
|
{% if registrationImmutable %}
|
|
{% set registrationToggleAttrs = registrationToggleAttrs|merge({disabled: true}) %}
|
|
{% endif %}
|
|
{{ form_widget(form.REGISTRATION_ENABLED, {attr: registrationToggleAttrs}) }}
|
|
{{ form_label(form.REGISTRATION_ENABLED, null, {label_attr: {class: 'form-check-label'}}) }}
|
|
<div class="form-text">When disabled, public sign-up is blocked but admins can still create users from `/admin/users`.</div>
|
|
{% if registrationImmutable %}
|
|
<div class="form-text text-warning">Locked by <code>APP_ALLOW_REGISTRATION</code> ({{ registrationOverrideValue ? 'enabled' : 'disabled' }}).</div>
|
|
{% endif %}
|
|
</div>
|
|
<div>
|
|
<button class="btn btn-success" type="submit">Save settings</button>
|
|
</div>
|
|
{{ form_end(form) }}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
|