I’m want to chnage dialog box name from submit to save. I tried to change using below mentioned code but its not working for me.
d.fields_dict.ht.$wrapper.find('form d [type="submit"]').attr('value', 'Save');
My Current code snippet is:
let d = new frappe.ui.Dialog({
'fields': [
{'fieldname': 'ht', 'fieldtype': 'HTML'},
{'fieldname': 'Total Applied', 'fieldtype': 'Float', 'read_only':1, 'label':'Total Applied Leave', 'default': total_applied_leaves},
{'fieldname': 'Fully Paid', 'fieldtype': 'Float', 'read_only':1, 'label':'Total Paid Leave', 'default': parseFloat(data.paidQuota)},
{'fieldname': 'Partically Paid', 'fieldtype': 'Float', 'read_only':1, 'label':'Total Unpaid Leave', 'default': parseFloat(data.unpaidQuota)}
],
primary_action: function(){
d.hide();
frappe.show_alert(d.get_values());
}
});
d.fields_dict.ht.$wrapper.html('Your leave deduction will be on following bases.');
d.fields_dict.ht.$wrapper.find('form d [type="submit"]').attr('value', 'Save');
d.show();
Please help me if anyone knows how to change it.
Thanks in Advance.