settings_ui: Add checkbox for toggling field.

Added a checkbox to toggle the option to automatically offer
to update the time zone with the browser time zone,
which is handled by the user profile field
"web_suggest_update_timezone".

A tooltip is also attached explaining the feature.

Fixes part of #16957
This commit is contained in:
Kislay Verma
2024-12-12 13:20:18 +00:00
committed by Tim Abbott
parent 00df8a593d
commit a817671809
6 changed files with 45 additions and 0 deletions

View File

@@ -1198,6 +1198,16 @@ run_test("user_settings", ({override}) => {
override(user_settings, "web_navigate_to_sent_message", true);
dispatch(event);
assert_same(user_settings.web_navigate_to_sent_message, false);
{
const event = event_fixtures.user_settings_web_suggest_update_timezone;
dispatch(event);
assert.equal($("#automatically_offer_update_time_zone").prop("checked"), true);
event.value = false;
dispatch(event);
assert.equal($("#automatically_offer_update_time_zone").prop("checked"), false);
}
});
run_test("update_message (read)", ({override}) => {