Author: justi9
Date: 2009-02-23 17:53:27 -0500 (Mon, 23 Feb 2009)
New Revision: 3129
Modified:
mgmt/trunk/cumin/python/cumin/__init__.py
mgmt/trunk/cumin/python/cumin/user.py
mgmt/trunk/cumin/python/cumin/user.strings
Log:
Add an operator-email config parameter and use it in the login text
Modified: mgmt/trunk/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/__init__.py 2009-02-23 20:03:59 UTC (rev 3128)
+++ mgmt/trunk/cumin/python/cumin/__init__.py 2009-02-23 22:53:27 UTC (rev 3129)
@@ -166,6 +166,8 @@
param = ConfigParameter(self, "expire-threshold", int)
param.default = 24 * 3600 # 1 day
+ param = ConfigParameter(self, "operator-email", str)
+
def init(self):
super(CuminConfig, self).init()
Modified: mgmt/trunk/cumin/python/cumin/user.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/user.py 2009-02-23 20:03:59 UTC (rev 3128)
+++ mgmt/trunk/cumin/python/cumin/user.py 2009-02-23 22:53:27 UTC (rev 3129)
@@ -125,6 +125,14 @@
else:
self.__login_invalid.set(session, True)
+ def render_operator_link(self, session):
+ email = self.app.config.operator_email
+
+ if email:
+ return "<a href=\"mailto:%s\">site
operator</a>" % email
+ else:
+ return "site operator"
+
def render_login_invalid(self, session):
if self.__login_invalid.get(session):
return self.get_string("login_invalid")
Modified: mgmt/trunk/cumin/python/cumin/user.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/user.strings 2009-02-23 20:03:59 UTC (rev 3128)
+++ mgmt/trunk/cumin/python/cumin/user.strings 2009-02-23 22:53:27 UTC (rev 3129)
@@ -59,7 +59,7 @@
<p>Enter your user name and password to log in.</p>
<p>If you do not have an account or have trouble logging in, contact
- the <a href="{operator_email}">site operator</a>.</p>
+ the {operator_link}.</p>
{login_invalid}
Show replies by date