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:
Shariq Ansari 2021-02-22 19:28:01 +05:30 committed by GitHub
parent 14472f6bab
commit 8676bedd18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(`
<span class="phone-btn">
<a class="btn-open no-decoration" title="${__('Make a call')}">