mirror of
https://github.com/zulip/zulip.git
synced 2026-07-18 21:04:19 +08:00
settings: Fix live update code for twenty_four_hour_time setting.
We need to handle live-update of twenty_four_hour_time setting separately in update_page because the database value of this setting is boolean but we use dropdown in the frontend for this setting with option values as "true" and "false" strings.
This commit is contained in:
parent
4a1153b06c
commit
f49980098d
@ -26,12 +26,16 @@ export function update_page(property) {
|
||||
return;
|
||||
}
|
||||
const container = $(realm_default_settings_panel.container);
|
||||
const value = realm_user_settings_defaults[property];
|
||||
let value = realm_user_settings_defaults[property];
|
||||
|
||||
if (property === "emojiset") {
|
||||
container.find(`input[value=${CSS.escape(value)}]`).prop("checked", true);
|
||||
return;
|
||||
}
|
||||
if (property === "twenty_four_hour_time") {
|
||||
value = value.toString();
|
||||
}
|
||||
|
||||
const input_elem = container.find(`[name=${CSS.escape(property)}]`);
|
||||
settings_org.set_input_element_value(input_elem, value);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user