Show More
@@ -174,7 +174,7 b' class ProjectDashboardHandler(AuthenticatedHandler):' | |||
|
174 | 174 | |
|
175 | 175 | class LoginHandler(AuthenticatedHandler): |
|
176 | 176 | |
|
177 |
def _render(self, message= |
|
|
177 | def _render(self, message=None): | |
|
178 | 178 | self.render('login.html', |
|
179 | 179 | next=self.get_argument('next', default='/'), |
|
180 | 180 | read_only=self.read_only, |
@@ -190,7 +190,7 b' class LoginHandler(AuthenticatedHandler):' | |||
|
190 | 190 | if passwd_check(self.application.password, pwd): |
|
191 | 191 | self.set_secure_cookie('username', str(uuid.uuid4())) |
|
192 | 192 | else: |
|
193 | self._render(message='Invalid password') | |
|
193 | self._render(message={'error': 'Invalid password'}) | |
|
194 | 194 | return |
|
195 | 195 | |
|
196 | 196 | self.redirect(self.get_argument('next', default='/')) |
@@ -200,7 +200,7 b' class LogoutHandler(AuthenticatedHandler):' | |||
|
200 | 200 | |
|
201 | 201 | def get(self): |
|
202 | 202 | self.clear_cookie('username') |
|
203 | self.render('logout.html') | |
|
203 | self.render('logout.html', message={'info': 'Successfully logged out.'}) | |
|
204 | 204 | |
|
205 | 205 | |
|
206 | 206 | class NewHandler(AuthenticatedHandler): |
@@ -102,12 +102,27 b'' | |||
|
102 | 102 | box-pack: center; |
|
103 | 103 | } |
|
104 | 104 | |
|
105 |
|
|
|
106 |
border: 1px |
|
|
107 | background-color: #FFD3D1; | |
|
105 | .message { | |
|
106 | border-width: 1px; | |
|
107 | border-style: solid; | |
|
108 | 108 | text-align: center; |
|
109 | 109 | padding: 0.5em; |
|
110 | margin: 0.5em; | |
|
110 | margin: 0.5em 0; | |
|
111 | } | |
|
112 | ||
|
113 | .message.error { | |
|
114 | background-color: #FFD3D1; | |
|
115 | border-color: red; | |
|
116 | } | |
|
117 | ||
|
118 | .message.warning { | |
|
119 | background-color: #FFD09E; | |
|
120 | border-color: orange; | |
|
121 | } | |
|
122 | ||
|
123 | .message.info { | |
|
124 | background-color: #CBFFBA; | |
|
125 | border-color: green; | |
|
111 | 126 | } |
|
112 | 127 | |
|
113 | 128 | #content_panel { |
General Comments 0
You need to be logged in to leave comments.
Login now