settings: Add prefix to settings_checkbox references in display_settings.

This commit adds prefix paramter with value "user_" to the
settings_checkbox references in display_settings.hbs such
that ids are unique when we use display_settings.hbs for
realm-level settings UI.
This commit is contained in:
Sahil Batra 2021-08-20 00:34:24 +05:30 committed by Tim Abbott
parent 8bf5b3a399
commit cf1a7c4d1c
2 changed files with 5 additions and 3 deletions

View File

@ -42,7 +42,8 @@
setting_name=this
is_checked=(lookup ../user_settings this)
label=(lookup ../settings_label this)
render_only=(lookup ../display_settings.render_only this)}}
render_only=(lookup ../display_settings.render_only this)
prefix=../prefix}}
{{/each}}
<div class="input-group">
@ -97,6 +98,7 @@
{{> settings_checkbox
setting_name="translate_emoticons"
is_checked=user_settings.translate_emoticons
label=settings_label.translate_emoticons}}
label=settings_label.translate_emoticons
prefix=prefix}}
</div>
</form>

View File

@ -1,3 +1,3 @@
<div id="user-display-settings" class="settings-section" data-name="display-settings">
{{> display_settings}}
{{> display_settings prefix="user_"}}
</div>