Merge pull request #15468 from pateljannat/time-zone-info-in-web-form

fix: Time zone info in web form
This commit is contained in:
mergify[bot] 2022-01-06 05:52:16 +00:00 committed by GitHub
commit 9c8a3003b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -196,7 +196,7 @@ export default class GridRow {
// REDESIGN-TODO: Make translation contextual, this No is Number
var txt = (this.doc ? this.doc.idx : __("No."));
this.row_index = $(
`<div class="row-index sortable-handle col col-xs-1">
`<div class="row-index sortable-handle col">
${this.row_check_html}
<span class="hidden-xs">${txt}</span></div>`)
.appendTo(this.row)

View file

@ -78,6 +78,10 @@ frappe.boot = {
sysdefaults: {
float_precision: parseInt("{{ frappe.get_system_settings('float_precision') or 3 }}"),
date_format: "{{ frappe.get_system_settings('date_format') or 'yyyy-mm-dd' }}",
},
time_zone: {
system: "{{ frappe.utils.get_time_zone() }}",
user: "{{ frappe.db.get_value('User', frappe.session.user, 'time_zone') or frappe.utils.get_time_zone() }}"
}
};
// for backward compatibility of some libs