From 8676bedd18aae126fea412adbc7cb98859643b77 Mon Sep 17 00:00:00 2001 From: Shariq Ansari <30859809+shariquerik@users.noreply.github.com> Date: Mon, 22 Feb 2021 19:28:01 +0530 Subject: [PATCH] fix: Add phone icon on read only phone fields (#24680) * fix: Add phone icon on read only phone fields * fix: sider fix --- erpnext/public/js/telephony.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/public/js/telephony.js b/erpnext/public/js/telephony.js index 6cb1207e79..b66126c2b8 100644 --- a/erpnext/public/js/telephony.js +++ b/erpnext/public/js/telephony.js @@ -1,13 +1,16 @@ frappe.ui.form.ControlData = frappe.ui.form.ControlData.extend( { make_input() { - this._super(); + if (!this.df.read_only) { + this._super(); + } if (this.df.options == 'Phone') { this.setup_phone(); } }, setup_phone() { if (frappe.phone_call.handler) { - this.$wrapper.find('.control-input') + let control = this.df.read_only ? '.control-value' : '.control-input'; + this.$wrapper.find(control) .append(`