feat: show send acknowledgement button if enabled in settings
This commit is contained in:
parent
e4c58c37c8
commit
b4d3666e69
@ -17,11 +17,13 @@ frappe.ui.form.on('Membership', {
|
||||
});
|
||||
});
|
||||
|
||||
frm.add_custom_button("Send Acknowledgement", () => {
|
||||
frm.call("send_acknowlement").then(() => {
|
||||
frm.reload_doc();
|
||||
frappe.db.get_single_value("Membership Settings", "send_email").then(val => {
|
||||
if (val) frm.add_custom_button("Send Acknowledgement", () => {
|
||||
frm.call("send_acknowlement").then(() => {
|
||||
frm.reload_doc();
|
||||
});
|
||||
});
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
onload: function(frm) {
|
||||
|
Loading…
Reference in New Issue
Block a user