brotherton-erpnext/erpnext/public/js/website_utils.js
Ritwik Puri f193393f57
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
2023-04-05 12:04:36 +05:30

15 lines
408 B
JavaScript

// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
if(!window.erpnext) window.erpnext = {};
erpnext.subscribe_to_newsletter = function(opts, btn) {
return frappe.call({
type: "POST",
method: "frappe.email.doctype.newsletter.newsletter.subscribe",
btn: btn,
args: {"email": opts.email},
callback: opts.callback
});
}