mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
fix: Add phone icon on read only phone fields (#24680)
* fix: Add phone icon on read only phone fields * fix: sider fix
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
frappe.ui.form.ControlData = frappe.ui.form.ControlData.extend( {
|
frappe.ui.form.ControlData = frappe.ui.form.ControlData.extend( {
|
||||||
make_input() {
|
make_input() {
|
||||||
this._super();
|
if (!this.df.read_only) {
|
||||||
|
this._super();
|
||||||
|
}
|
||||||
if (this.df.options == 'Phone') {
|
if (this.df.options == 'Phone') {
|
||||||
this.setup_phone();
|
this.setup_phone();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup_phone() {
|
setup_phone() {
|
||||||
if (frappe.phone_call.handler) {
|
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(`
|
.append(`
|
||||||
<span class="phone-btn">
|
<span class="phone-btn">
|
||||||
<a class="btn-open no-decoration" title="${__('Make a call')}">
|
<a class="btn-open no-decoration" title="${__('Make a call')}">
|
||||||
|
|||||||
Reference in New Issue
Block a user