From 3b44aa9f6c8ba4f975bf00031a9246b0054d39f7 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Sun, 6 Nov 2022 04:37:36 -0600 Subject: [PATCH] namespace stuff --- files/templates/settings_personal.html | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/files/templates/settings_personal.html b/files/templates/settings_personal.html index 683db9ac59..1c5fbcc8f3 100644 --- a/files/templates/settings_personal.html +++ b/files/templates/settings_personal.html @@ -211,16 +211,13 @@
Filters
+ {% set ns = namespace(slurtext='Enable if you would like to automatically replace slurs.', profanitytext='Enable if you would like to automatically replace slurs.')} {# toggle_section(title, id, name, flag, below_text, disabled) #} {% if FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.slurreplacer %} - {% set slurtext = 'Enable if you would like to automatically replace slurs. Make filter permanent for a badge!' %} - {% else %} - {% set slurtext = 'Enable if you would like to automatically replace slurs.' %} + {% set ns.slurtext = 'Enable if you would like to automatically replace slurs. Make filter permanent for a badge!' %} {% endif %} {% if FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.profanityreplacer %} - {% set slurtext = 'Enable if you would like to automatically replace profanities. Make filter permanent for a badge!' %} - {% else %} - {% set profanitytext = 'Enable if you would like to automatically replace profanities.' %} + {% set ns.profanitytext = 'Enable if you would like to automatically replace profanities. Make filter permanent for a badge!' %} {% endif %} {{common.toggle_section("Slur Replacer", "slurreplacer", v.slurreplacer, slurtext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.slurreplacer > 1)}} {{common.toggle_section("Profanity Replacer", "profanityreplacer", v.slurreplacer, profanitytext, FEATURES['USERS_PERMANENT_WORD_FILTERS'] and v.profanityreplacer > 1)}} @@ -292,10 +289,10 @@
{%- endif %} {% endmacro %} -{% if v.slurreplacer and v.slurreplacer == 1 %} +{% if v.slurreplacer %} {{permanent_filter_modal('slurreplacer', '/settings/profile', 'slurreplacer', 'Slur Replacer', 'Social Justice Berserker')}} {% endif %} -{% if v.profanityreplacer and v.profanityreplacer == 1 %} +{% if v.profanityreplacer %} {{permanent_filter_modal('profanityreplacer', '/settings/profile', 'profanityreplacer', 'Profanity Replacer', 'Soapy-Mouthed Angel')}} {% endif %} {% endblock %}