fix!: require sender and message for contact us page (#34707)

fix!: require sender and message for contact us page (#34707)

* fix: require sender and message for contact us page

* refactor: dont override frappe.send_message from client side

used override_whitelisted_method hook for the same

(cherry picked from commit f193393f57)

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
This commit is contained in:
mergify[bot]
2023-04-05 12:33:55 +05:30
committed by GitHub
parent 88c8c36805
commit 3c0cc024aa
3 changed files with 7 additions and 21 deletions

View File

@@ -3,18 +3,6 @@
if(!window.erpnext) window.erpnext = {};
// Add / update a new Lead / Communication
// subject, sender, description
frappe.send_message = function(opts, btn) {
return frappe.call({
type: "POST",
method: "erpnext.templates.utils.send_message",
btn: btn,
args: opts,
callback: opts.callback
});
};
erpnext.subscribe_to_newsletter = function(opts, btn) {
return frappe.call({
type: "POST",
@@ -24,6 +12,3 @@ erpnext.subscribe_to_newsletter = function(opts, btn) {
callback: opts.callback
});
}
// for backward compatibility
erpnext.send_message = frappe.send_message;