2015-03-03 14:55:30 +05:30
|
|
|
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
2013-08-05 14:59:54 +05:30
|
|
|
// License: GNU General Public License v3. See license.txt
|
|
|
|
|
2013-12-31 17:38:21 +05:30
|
|
|
if(!window.erpnext) window.erpnext = {};
|
2012-12-14 16:39:27 +05:30
|
|
|
|
2013-03-19 11:12:22 +05:30
|
|
|
// Add / update a new Lead / Communication
|
2012-12-14 16:39:27 +05:30
|
|
|
// 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",
|
2013-12-31 17:38:21 +05:30
|
|
|
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-07-02 11:40:16 +05:30
|
|
|
});
|
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;
|