fix(UX): warn about Etc/* timezones behaviour (#18587)

This commit is contained in:
Ankush Menat 2022-10-27 11:52:47 +05:30 committed by GitHub
parent 5c2b917f52
commit c5c91bdbd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,6 +17,16 @@ frappe.ui.form.on("User", {
}
},
time_zone: function (frm) {
if (frm.doc.time_zone && frm.doc.time_zone.startsWith("Etc")) {
frm.set_df_property(
"time_zone",
"description",
__("Note: Etc timezones have their signs reversed.")
);
}
},
role_profile_name: function (frm) {
if (frm.doc.role_profile_name) {
frappe.call({
@ -259,6 +269,7 @@ frappe.ui.form.on("User", {
}
frm.dirty();
}
frm.trigger("time_zone");
},
validate: function (frm) {
if (frm.roles_editor) {