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:
parent
fa73074250
commit
261c42186f
@ -1,11 +1,18 @@
|
|||||||
frappe.ui.form.ControlData = frappe.ui.form.ControlData.extend( {
|
frappe.ui.form.ControlData = frappe.ui.form.ControlData.extend( {
|
||||||
make_input() {
|
make_input() {
|
||||||
if (!this.df.read_only) {
|
this._super();
|
||||||
this._super();
|
|
||||||
}
|
|
||||||
if (this.df.options == 'Phone') {
|
if (this.df.options == 'Phone') {
|
||||||
this.setup_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() {
|
setup_phone() {
|
||||||
if (frappe.phone_call.handler) {
|
if (frappe.phone_call.handler) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user