fix signup toggle

master
Aevann 2023-08-10 00:22:46 +03:00
parent f91bc96037
commit 66c2740a8a
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@
{% if not (setting == "offline_mode" and v.admin_level < PERMS["SITE_OFFLINE_MODE"]) and setting !="ddos_detected" %}
<div class="custom-control custom-switch{% if loop.index > 1 %} mt-1{% endif %}" id="settings-{{setting}}-container">
{% set disabled = (setting in ("under_attack", "login_required", "signups") and SITE_SETTINGS["ddos_detected"]) %}
<input {% if disabled %}disabled checked{% endif %} autocomplete="off" type="checkbox" class="custom-control-input" id="settings-{{setting}}-checkbox" {% if SITE_SETTINGS[setting] %}checked{% endif %} data-nonce="{{g.nonce}}" data-onchange="postToastSwitch(this, '/admin/site_settings/{{setting}}');">
<input {% if disabled %}disabled {% if setting in ("under_attack", "login_required") %}checked{% endif %}{% endif %} autocomplete="off" type="checkbox" class="custom-control-input" id="settings-{{setting}}-checkbox" {% if SITE_SETTINGS[setting] %}checked{% endif %} data-nonce="{{g.nonce}}" data-onchange="postToastSwitch(this, '/admin/site_settings/{{setting}}');">
<label class="custom-control-label" for="settings-{{setting}}-checkbox">{{setting.replace('_', ' ').title()}}</label>
</div>
{% endif %}