fix: remove newsletter related code

This commit is contained in:
sokumon
2025-06-27 01:21:33 +05:30
parent fab0f4f337
commit b630ccc8e6
4 changed files with 0 additions and 58 deletions

View File

@@ -24,7 +24,6 @@ develop_version = "15.x.x-develop"
app_include_js = "erpnext.bundle.js"
app_include_css = "erpnext.bundle.css"
web_include_js = "erpnext-web.bundle.js"
web_include_css = "erpnext-web.bundle.css"
email_css = "email_erpnext.bundle.css"

View File

@@ -1 +0,0 @@
import "./website_utils";

View File

@@ -1,14 +0,0 @@
// 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,
});
};

View File

@@ -1,42 +0,0 @@
{% if not hide_footer_signup %}
<div class="input-group">
<input type="text" class="form-control"
id="footer-subscribe-email"
placeholder="{{ _('Your email address...') }}"
aria-label="{{ _('Your email address...') }}"
aria-describedby="footer-subscribe-button">
<div class="input-group-append">
<button class="btn btn-sm btn-secondary pl-3 pr-3 ml-2"
type="button" id="footer-subscribe-button">{{ _("Get Updates") }}</button>
</div>
</div>
<script>
frappe.ready(function() {
$("#footer-subscribe-button").click(function() {
if($("#footer-subscribe-email").val() && validate_email($("#footer-subscribe-email").val())) {
$("#footer-subscribe-email").attr('disabled', true);
$("#footer-subscribe-button").html(__("Sending..."))
.attr("disabled", true);
erpnext.subscribe_to_newsletter({
email: $("#footer-subscribe-email").val(),
callback: function(r) {
if(!r.exc) {
$("#footer-subscribe-button").html(__("Added"))
.attr("disabled", true);
} else {
$("#footer-subscribe-button").html(__("Error: Not a valid id?"))
.addClass("btn-danger").attr("disabled", false);
$("#footer-subscribe-email").val("").attr('disabled', false);
}
}
});
}
else
frappe.msgprint(frappe._("Please enter valid email address"))
});
});
</script>
{% endif %}