Leela vadlamudi | a3845a9 | 2020-12-01 13:04:53 +0530 | [diff] [blame] | 1 | frappe.ui.form.ControlData = frappe.ui.form.ControlData.extend( { |
| 2 | make_input() { |
| 3 | this._super(); |
| 4 | if (this.df.options == 'Phone') { |
| 5 | this.setup_phone(); |
| 6 | } |
| 7 | }, |
| 8 | setup_phone() { |
| 9 | if (frappe.phone_call.handler) { |
| 10 | this.$wrapper.find('.control-input') |
| 11 | .append(` |
| 12 | <span class="phone-btn"> |
| 13 | <a class="btn-open no-decoration" title="${__('Make a call')}"> |
| 14 | <i class="fa fa-phone"></i></a> |
| 15 | </span> |
| 16 | `) |
| 17 | .find('.phone-btn') |
| 18 | .click(() => { |
| 19 | frappe.phone_call.handler(this.get_value(), this.frm); |
| 20 | }); |
| 21 | } |
| 22 | } |
Leela vadlamudi | 29778e2 | 2020-12-15 21:23:17 +0530 | [diff] [blame] | 23 | }); |