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", () => {
|
frappe.db.get_single_value("Membership Settings", "send_email").then(val => {
|
||||||
frm.call("send_acknowlement").then(() => {
|
if (val) frm.add_custom_button("Send Acknowledgement", () => {
|
||||||
frm.reload_doc();
|
frm.call("send_acknowlement").then(() => {
|
||||||
|
frm.reload_doc();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
onload: function(frm) {
|
onload: function(frm) {
|
||||||
|
Loading…
Reference in New Issue
Block a user