settings: Add prefix to checkboxes used in notification_settings.

This commit adds prefix paramter with value "user_" to the
settings_checkbox and notification_settings_checkboxes references
in notification_settings.hbs such that ids are unique when we use
notification_settings.hbs for realm-level settings UI.
This commit is contained in:
Sahil Batra 2021-08-20 13:18:11 +05:30 committed by Tim Abbott
parent 32a43985d7
commit 7b79980be9
2 changed files with 9 additions and 5 deletions

View File

@ -32,7 +32,8 @@
{{> notification_settings_checkboxes
setting_name=this.setting_name
is_checked=this.is_checked
is_disabled=this.is_disabled }}
is_disabled=this.is_disabled
prefix=../../prefix }}
{{/each}}
</tr>
{{/each}}
@ -56,7 +57,8 @@
{{> settings_checkbox
setting_name=this
is_checked=(lookup ../user_settings this)
label=(lookup ../settings_label this)}}
label=(lookup ../settings_label this)
prefix=../prefix}}
{{/each}}
<label for="notification_sound">
@ -93,7 +95,8 @@
setting_name=this
is_checked=(lookup ../user_settings this)
label=(lookup ../settings_label this)
show_push_notifications_tooltip=(lookup ../show_push_notifications_tooltip this)}}
show_push_notifications_tooltip=(lookup ../show_push_notifications_tooltip this)
prefix=../prefix}}
{{/each}}
<h5>{{t "Email" }}</h5>
@ -102,7 +105,8 @@
{{> settings_checkbox
setting_name=this
is_checked=(lookup ../user_settings this)
label=(lookup ../settings_label this)}}
label=(lookup ../settings_label this)
prefix=../prefix}}
{{/each}}
</div>

View File

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