changed from label based to fieldname based
This commit is contained in:
parent
d7721a605d
commit
147c727743
@ -57,11 +57,7 @@ frappe.ui.form.on('Employee',{
|
|||||||
frm.events.update_contact(frm)
|
frm.events.update_contact(frm)
|
||||||
},
|
},
|
||||||
update_contact:function(frm){
|
update_contact:function(frm){
|
||||||
for(var i =0, j=frm.fields.length;i<j;i++){
|
frm.set_value("prefered_email",frm.fields_dict[frappe.model.scrub(frm.doc.prefered_contact_email)].value)
|
||||||
if (frm.fields[i].df.label===frm.doc.prefered_contact_email){
|
|
||||||
frm.set_value("prefered_email",frm.fields[i].value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
cur_frm.cscript = new erpnext.hr.EmployeeController({frm: cur_frm});
|
cur_frm.cscript = new erpnext.hr.EmployeeController({frm: cur_frm});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user