brotherton-erpnext/erpnext/public/js/website_utils.js

30 lines
751 B
JavaScript
Raw Normal View History

// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
if(!window.erpnext) window.erpnext = {};
2013-03-19 11:12:22 +05:30
// Add / update a new Lead / Communication
// subject, sender, description
2014-02-14 15:47:51 +05:30
frappe.send_message = function(opts, btn) {
return frappe.call({
2013-03-19 17:59:49 +05:30
type: "POST",
method: "erpnext.templates.utils.send_message",
2013-09-11 18:58:20 +05:30
btn: btn,
2013-03-19 17:59:49 +05:30
args: opts,
callback: opts.callback
});
2013-09-11 18:58:20 +05:30
};
2015-05-25 10:50:48 +05:30
erpnext.subscribe_to_newsletter = function(opts, btn) {
return frappe.call({
type: "POST",
2016-06-28 11:17:02 +05:30
method: "frappe.email.doctype.newsletter.newsletter.subscribe",
2015-05-25 10:50:48 +05:30
btn: btn,
args: {"email": opts.email},
callback: opts.callback
});
}
2013-09-11 18:58:20 +05:30
// for backward compatibility
2015-05-25 10:50:48 +05:30
erpnext.send_message = frappe.send_message;