From 62091db7a8d5e5aae52a4ee820c4e60de264e391 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 28 Sep 2012 16:06:06 +0530 Subject: [PATCH] fix in expiry msg --- erpnext/startup/event_handlers.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/erpnext/startup/event_handlers.py b/erpnext/startup/event_handlers.py index ffbf11373b..9b9c03019f 100644 --- a/erpnext/startup/event_handlers.py +++ b/erpnext/startup/event_handlers.py @@ -118,22 +118,17 @@ def check_if_expired(): # if expired, stop user from logging in from webnotes.utils import formatdate + msg = """Oops! Your subscription expired on %s. +
Nothing catastrophic.
""" % formatdate(conf.expires_on) + if 'System Manager' in webnotes.user.roles: - webnotes.response['server_messages'] = """Oops! \ - Your subscription expired on %s. - - Nothing catastrophic. - - Just drop in a mail at support@erpnext.com and \ - we will guide you to get your account re-activated.""" % formatdate(conf.expires_on) + msg += """Just drop in a mail at support@erpnext.com and + we will guide you to get your account re-activated.""" else: - webnotes.response['server_messages'] = """Oops! \ - Your subscription expired on %s. - - Nothing catastrophic. - - Just ask your System Manager to drop in a mail at support@erpnext.com 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 support@erpnext.com and + we will guide him to get your account re-activated.""" + + webnotes.msgprint(msg) webnotes.response['message'] = 'Account Expired' raise webnotes.AuthenticationError