Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Add comments for default settings update_page.

Tim Abbott4aedb129ea92
diff --git a/static/js/settings_realm_user_settings_defaults.js b/static/js/settings_realm_user_settings_defaults.js
index ada74150559..a1be40f693a 100644
--- a/static/js/settings_realm_user_settings_defaults.js
+++ b/static/js/settings_realm_user_settings_defaults.js
@@ -28,10 +28,16 @@ export function update_page(property) {
const container = $(realm_default_settings_panel.container);
let value = realm_user_settings_defaults[property];
+ // settings_org.set_input_element_value doesn't support radio
+ // button widgets like this one.
if (property === "emojiset") {
container.find(`input[value=${CSS.escape(value)}]`).prop("checked", true);
return;
}
+
+ // The twenty_four_hour_time setting is represented as a boolean
+ // in the API, but a dropdown with "true"/"false" as strings in
+ // the UI, so we need to convert its format here.
if (property === "twenty_four_hour_time") {
value = value.toString();
}