Author: justi9
Date: 2009-03-18 17:26:34 -0400 (Wed, 18 Mar 2009)
New Revision: 3172
Modified:
mgmt/trunk/cumin/python/cumin/__init__.py
mgmt/trunk/cumin/python/cumin/user.py
mgmt/trunk/cumin/python/cumin/user.strings
Log:
Change the login page to use HtmlPage
Modified: mgmt/trunk/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/__init__.py 2009-03-18 21:17:16 UTC (rev 3171)
+++ mgmt/trunk/cumin/python/cumin/__init__.py 2009-03-18 21:26:34 UTC (rev 3172)
@@ -56,7 +56,7 @@
unprotected.add(self.main_page.css_page)
unprotected.add(self.main_page.javascript_page)
- self.login_page = LoginPage(self, "login.html")
+ self.login_page = LoginPage(self, "login")
self.add_page(self.login_page)
unprotected.add(self.login_page)
Modified: mgmt/trunk/cumin/python/cumin/user.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/user.py 2009-03-18 21:17:16 UTC (rev 3171)
+++ mgmt/trunk/cumin/python/cumin/user.py 2009-03-18 21:26:34 UTC (rev 3172)
@@ -52,10 +52,12 @@
log.debug("Expired %i user sessions", count)
-class LoginPage(Page):
+class LoginPage(HtmlPage):
def __init__(self, app, name):
super(LoginPage, self).__init__(app, name)
+ self.html_class = LoginPage.__name__
+
self.logout = BooleanParameter(app, "logout")
self.add_parameter(self.logout)
Modified: mgmt/trunk/cumin/python/cumin/user.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/user.strings 2009-03-18 21:17:16 UTC (rev 3171)
+++ mgmt/trunk/cumin/python/cumin/user.strings 2009-03-18 21:26:34 UTC (rev 3172)
@@ -4,22 +4,6 @@
padding: 4em;
}
-[LoginPage.html]
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
- <head>
- <title>{title}</title>
- <link rel="stylesheet" type="text/css"
href="cumin.css"/>
- <link rel="shortcut icon" href="resource?name=favicon.ico"
type="image/x-icon"/>
- <script src="resource?name=wooly.js"
type="text/javascript"> </script>
- <script src="cumin.js" type="text/javascript">
</script>
- </head>
- <body class="LoginPage">
- {form}
- </body>
-</html>
-
[LoginForm.css]
form.LoginForm {
background: #fff;