fix: updating phone icon setup logic for readonly fields (#24787)

* fix: updating phone icon setup logic for readonly fields

* fix: sider fix
This commit is contained in:
Shariq Ansari 2021-03-09 20:28:00 +05:30 committed by GitHub
parent fa73074250
commit 261c42186f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,18 @@
frappe.ui.form.ControlData = frappe.ui.form.ControlData.extend( {
make_input() {
if (!this.df.read_only) {
this._super();
}
this._super();
if (this.df.options == 'Phone') {
this.setup_phone();
}
if (this.frm && this.frm.fields_dict) {
Object.values(this.frm.fields_dict).forEach(function(field) {
if (field.df.read_only === 1 && field.df.options === 'Phone'
&& field.disp_area.style[0] != 'display' && !field.has_icon) {
field.setup_phone();
field.has_icon = true;
}
});
}
},
setup_phone() {
if (frappe.phone_call.handler) {