settings: Use class instead of id for email batching period setting.

This commit removes the id from email notification batching period
setting dropdown and adds class such that we can use same template
for the realm-level settings as well. We also add 'setting_'
prefix as we do for other settings and modify the JS code accordingly.
This commit is contained in:
Sahil Batra
2021-09-13 20:08:26 +05:30
committed by Tim Abbott
parent 67d534869c
commit 90e4740455
2 changed files with 4 additions and 2 deletions

View File

@@ -124,7 +124,9 @@ export function set_up() {
}
});
const email_notifications_batching_period_dropdown = $("#email_notifications_batching_period");
const email_notifications_batching_period_dropdown = container.find(
".setting_email_notifications_batching_period_seconds",
);
email_notifications_batching_period_dropdown.val(
user_settings.email_notifications_batching_period_seconds,
);

View File

@@ -114,7 +114,7 @@
</label>
<div class="input-group">
<select name="email_notifications_batching_period_seconds" id="email_notifications_batching_period" data-setting-widget-type="number">
<select name="email_notifications_batching_period_seconds" class="setting_email_notifications_batching_period_seconds" data-setting-widget-type="number">
{{#each email_notifications_batching_period_values}}
<option value="{{ this.value }}">{{ this.description }}</option>
{{/each}}