[website] [minor] moving to framework
diff --git a/portal/templates/includes/transactions.html b/portal/templates/includes/transactions.html
index 65651ca..036a77c 100644
--- a/portal/templates/includes/transactions.html
+++ b/portal/templates/includes/transactions.html
@@ -6,6 +6,8 @@
<li><a href="index">Home</a></li>
<li class="active"><i class="{{ icon }} icon-fixed-width"></i> {{ title }}</li>
</ul>
+ <p id="msgprint-alert" class="alert alert-danger"
+ style="display: none;"> </p>
<div class="list-group transaction-list">
<div class="progress progress-striped active">
<div class="progress-bar progress-bar-info" style="width: 100%;"></div>
@@ -35,7 +37,6 @@
callback: function(r) {
$list.find(".progress").remove();
$show_more.toggleClass("hide", !(r.message && r.message.length===20));
-
if(!(r.message && r.message.length)) {
console.log("empty");
if(!$list.html().trim()) {
diff --git a/portal/website_transactions.py b/portal/utils.py
similarity index 75%
rename from portal/website_transactions.py
rename to portal/utils.py
index 21e9111..25da39c 100644
--- a/portal/website_transactions.py
+++ b/portal/utils.py
@@ -47,4 +47,17 @@
"doclist": bean.doclist,
"webnotes": webnotes,
"utils": webnotes.utils
- }
\ No newline at end of file
+ }
+
+@webnotes.whitelist(allow_guest=True)
+def send_message(subject="Website Query", message="", sender="", status="Open"):
+ from website.doctype.contact_us_settings.templates.pages.contact \
+ import send_message as website_send_message
+
+ if not website_send_message(subject, message, sender):
+ return
+
+ # make lead / communication
+ from selling.doctype.lead.get_leads import add_sales_communication
+ add_sales_communication(subject or "Website Query", message, sender, sender,
+ mail=None, status=status)
\ No newline at end of file