added unsubscribed fields in Lead and Contact and cleaned up sendmail function
diff --git a/erpnext/website/doctype/blog_subscriber/__init__.py b/erpnext/website/doctype/blog_subscriber/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/website/doctype/blog_subscriber/__init__.py
+++ /dev/null
diff --git a/erpnext/website/doctype/blog_subscriber/blog_subscriber.txt b/erpnext/website/doctype/blog_subscriber/blog_subscriber.txt
deleted file mode 100644
index 1fa8223..0000000
--- a/erpnext/website/doctype/blog_subscriber/blog_subscriber.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-# DocType, Blog Subscriber
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-03-27 14:36:47',
- 'docstatus': 0,
- 'modified': '2012-03-27 14:36:47',
- 'modified_by': u'Administrator',
- 'owner': u'Administrator'
- },
-
- # These values are common for all DocType
- {
- 'colour': u'White:FFF',
- 'doctype': 'DocType',
- 'module': u'Website',
- 'name': '__common__',
- 'section_style': u'Simple',
- 'show_in_menu': 0,
- 'version': 1
- },
-
- # DocType, Blog Subscriber
- {
- 'doctype': 'DocType',
- 'name': u'Blog Subscriber'
- }
-]
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/__init__.py b/erpnext/website/page/unsubscribe/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/website/page/unsubscribe/__init__.py
+++ /dev/null
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.html b/erpnext/website/page/unsubscribe/unsubscribe.html
deleted file mode 100644
index 7b2b68e..0000000
--- a/erpnext/website/page/unsubscribe/unsubscribe.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<div class="layout_wrapper">
- <div class="web-content">
- <h1>Unsubscribe</h1>
- <br>
- <div class="web-main-section">
- <input name="unsubscribe">
- <button class="btn" id="btn-unsubscribe">Unsubscribe</button>
- </div>
- <div class="web-side-section">
- </div>
- <div style="clear: both"></div>
- </div>
-</div>
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.js b/erpnext/website/page/unsubscribe/unsubscribe.js
deleted file mode 100644
index 9e83020..0000000
--- a/erpnext/website/page/unsubscribe/unsubscribe.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-pscript.onload_unsubscribe = function(wrapper) {
- var email = window.location.hash.split('/').splice(-1);
- $(wrapper).find('input[name="unsubscribe"]').val(email)
-
- $('#btn-unsubscribe').click(function() {
- var email = $(wrapper).find('input[name="unsubscribe"]').val();
- if(email) {
- var btn = this;
- wn.call({
- module:'website',
- page:'unsubscribe',
- method:'unsubscribe',
- args:email,
- btn: this,
- callback: function() {
- $(wrapper).find('input[name="unsubscribe"]').val('');
- }
- });
- }
- });
-}
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.py b/erpnext/website/page/unsubscribe/unsubscribe.py
deleted file mode 100644
index 9985ded..0000000
--- a/erpnext/website/page/unsubscribe/unsubscribe.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-import webnotes
-
-@webnotes.whitelist()
-def unsubscribe(arg):
- """unsubscribe from lists"""
- lists = [['Blog Subscriber', 'name']]
- for l in lists:
- webnotes.conn.sql("""delete from `tab%s` where %s=%s""" % (l[0], l[1], '%s'), arg)
-
- webnotes.msgprint('Unsubscribed!')
\ No newline at end of file
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.txt b/erpnext/website/page/unsubscribe/unsubscribe.txt
deleted file mode 100644
index 2cc3b58..0000000
--- a/erpnext/website/page/unsubscribe/unsubscribe.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# Page, unsubscribe
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2012-01-27 17:19:02',
- 'docstatus': 0,
- 'modified': '2012-01-27 17:19:02',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Page
- {
- 'doctype': 'Page',
- 'module': 'Website',
- 'name': '__common__',
- 'page_name': 'unsubscribe',
- 'standard': 'Yes',
- 'title': 'Unsubscribe'
- },
-
- # These values are common for all Page Role
- {
- 'doctype': 'Page Role',
- 'name': '__common__',
- 'parent': 'unsubscribe',
- 'parentfield': 'roles',
- 'parenttype': 'Page',
- 'role': 'Guest'
- },
-
- # Page, unsubscribe
- {
- 'doctype': 'Page',
- 'name': 'unsubscribe'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role'
- }
-]
\ No newline at end of file
diff --git a/erpnext/website/templates/pages/unsubscribed.html b/erpnext/website/templates/pages/unsubscribed.html
new file mode 100644
index 0000000..3dc7df9
--- /dev/null
+++ b/erpnext/website/templates/pages/unsubscribed.html
@@ -0,0 +1,11 @@
+{% extends "html/outer.html" %}
+
+{% block content %}
+<div class="content">
+ <div class="layout-wrapper layout-main">
+ <h3>Unsubscribed</h3>
+ <br>
+ <p><b>{{ webnotes.unsubscribed_email }}</b> has been unsubscribed.</p>
+ </div>
+</div>
+{% endblock %}
\ No newline at end of file