Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/erpnext/startup/event_handlers.py b/erpnext/startup/event_handlers.py
index ffbf113..472d5d1 100644
--- a/erpnext/startup/event_handlers.py
+++ b/erpnext/startup/event_handlers.py
@@ -118,22 +118,16 @@
# if expired, stop user from logging in
from webnotes.utils import formatdate
+ msg = """Oops! Your subscription expired on <b>%s</b>.<br>""" % formatdate(conf.expires_on)
+
if 'System Manager' in webnotes.user.roles:
- webnotes.response['server_messages'] = """Oops! \
- Your subscription expired on <b>%s</b>.
-
- Nothing catastrophic.
-
- Just drop in a mail at <b>support@erpnext.com</b> and \
- we will guide you to get your account re-activated.""" % formatdate(conf.expires_on)
+ msg += """Just drop in a mail at <b>support@erpnext.com</b> and
+ we will guide you to get your account re-activated."""
else:
- webnotes.response['server_messages'] = """Oops! \
- Your subscription expired on <b>%s</b>.
-
- Nothing catastrophic.
-
- Just ask your System Manager to drop in a mail at <b>support@erpnext.com</b> and \
- we will guide him to get your account re-activated.""" % formatdate(conf.expires_on)
+ msg += """Just ask your System Manager to drop in a mail at <b>support@erpnext.com</b> and
+ we will guide him to get your account re-activated."""
+
+ webnotes.msgprint(msg)
webnotes.response['message'] = 'Account Expired'
raise webnotes.AuthenticationError