diff --git a/gen/generator.py b/gen/generator.py index 3853d94..ecd05fa 100644 --- a/gen/generator.py +++ b/gen/generator.py @@ -489,6 +489,7 @@ class ZopeGenerator(Generator): msg('page_next', '', msg.PAGE_NEXT), msg('forgot_password', '', msg.FORGOT_PASSWORD), msg('ask_password_reinit', '', msg.ASK_PASSWORD_REINIT), + msg('wrong_password_reinit','', msg.WRONG_PASSWORD_REINIT), msg('reinit_mail_sent', '', msg.REINIT_MAIL_SENT), msg('reinit_password', '', msg.REINIT_PASSWORD), msg('reinit_password_body', '', msg.REINIT_PASSWORD_BODY), diff --git a/gen/mixins/ToolMixin.py b/gen/mixins/ToolMixin.py index 7105748..ebb61d8 100644 --- a/gen/mixins/ToolMixin.py +++ b/gen/mixins/ToolMixin.py @@ -1116,6 +1116,8 @@ class ToolMixin(BaseMixin): login = rq['login'] token = rq['token'] # Check if such token exists in temp folder + res = None + siteUrl = self.getSiteUrl() tokenFile = os.path.join(getOsTempFolder(), login) if os.path.exists(tokenFile): f = file(tokenFile) @@ -1131,13 +1133,15 @@ class ToolMixin(BaseMixin): if not String.EMAIL.match(email): email = user.email subject = self.translate('new_password') - siteUrl = self.getSiteUrl() map = {'password': newPassword, 'siteUrl': siteUrl} body = self.translate('new_password_body', mapping=map, format='text') sendMail(appyTool, email, subject, body) os.remove(tokenFile) - return self.goto(siteUrl, self.translate('new_password_sent')) + res = self.goto(siteUrl, self.translate('new_password_sent')) + if not res: + res = self.goto(siteUrl, self.translate('wrong_password_reinit')) + return res def getSearchValues(self, name, className): '''Gets the possible values for selecting a value for searching field diff --git a/gen/po.py b/gen/po.py index 59dd2c8..b3305a4 100644 --- a/gen/po.py +++ b/gen/po.py @@ -138,6 +138,15 @@ class PoMessage: PAGE_NEXT = 'Next page' FORGOT_PASSWORD = 'Forgot password?' ASK_PASSWORD_REINIT = 'Ask new password' + WRONG_PASSWORD_REINIT = 'Something went wrong. First possibility: you ' \ + 'have already clicked on the link (maybe have you double-clicked?) ' \ + 'and your password has already been re-initialized. Please check ' \ + 'that you haven\'t received your new password in another email. ' \ + 'Second possibility: the link that you received in your mailer was ' \ + 'splitted on several lines. In this case, please re-type the link in ' \ + 'one single line and retry. Third possibility: you have waited too ' \ + 'long and your request has expired, or a technical error occurred. ' \ + 'In this case, please try again to ask a new password from the start.' REINIT_MAIL_SENT = 'A mail has been sent to you. Please follow the ' \ 'instructions from this email.' REINIT_PASSWORD = 'Password re-initialisation' diff --git a/gen/ui/appy.css b/gen/ui/appy.css index c4275b3..875c8b9 100644 --- a/gen/ui/appy.css +++ b/gen/ui/appy.css @@ -62,7 +62,7 @@ img { border: 0; vertical-align: middle} .fakeButton { border: 1px solid #D7DEE4; background-color: #fde8e0; padding: 0px 8px 2px; font: italic 92% Helvetica,Arial,sans-serif} .message { position: absolute; top: -40px; left: 150px; font-size: 90%; - width: 600px; border: 1px #F0C36D solid; padding: 6px 16px; + width: 600px; border: 1px #F0C36D solid; padding: 6px; background-color: #F9EDBE; text-align: center; border-radius: 2px 2px 2px 2px; box-shadow: 0 2px 4px #A9A9A9;} .focus { font-size: 90%; margin: 7px; padding: 7px; background-color: #d7dee4; @@ -109,15 +109,15 @@ img { border: 0; vertical-align: middle} .section3 { font-size: 100%; font-style: italic; font-weight: bold; margin: 0.45em 0em 0.1em 0; background-color: #95a1b3; text-align: center; color: white; } -.odd { background-color: white; } -.even { background-color: #F4F5F6; } +.odd { background-color: #f9f9f9; } +.even { background-color: #f4f4f4; } .summary {margin-bottom: 5px;} .objectTitle { font-size: 11pt; border-bottom: 3px solid grey; font-weight: bold;} .by { padding-top: 5px;} .workflow { text-align: center; border-top: 1px solid grey; - background-color: #f8f8f8;} -.underTitle { background-color: #F4F5F6;} + background-color: #ececec } +.underTitle { background-color: #e9e9e9 } .objectNavigate { margin-top: 3px;} .underline { border-bottom: 1px dotted grey;} .state { font-weight: bold; border-bottom: 1px dashed grey;} diff --git a/gen/ui/odt.png b/gen/ui/odt.png index 74710e4..9cb241e 100644 Binary files a/gen/ui/odt.png and b/gen/ui/odt.png differ diff --git a/gen/ui/page.pt b/gen/ui/page.pt index 91aad7f..262edd1 100644 --- a/gen/ui/page.pt +++ b/gen/ui/page.pt @@ -322,5 +322,9 @@ This macro displays the global message on the page. -
+
+ + +
diff --git a/gen/ui/tabBg.png b/gen/ui/tabBg.png index 4eb1fff..fd50a47 100644 Binary files a/gen/ui/tabBg.png and b/gen/ui/tabBg.png differ diff --git a/gen/ui/tabBgu.png b/gen/ui/tabBgu.png index 9318415..f65935e 100644 Binary files a/gen/ui/tabBgu.png and b/gen/ui/tabBgu.png differ diff --git a/gen/ui/tabLeft.png b/gen/ui/tabLeft.png index 3f41de8..939ad14 100644 Binary files a/gen/ui/tabLeft.png and b/gen/ui/tabLeft.png differ diff --git a/gen/ui/tabLeftu.png b/gen/ui/tabLeftu.png index 91443e8..a9425c9 100644 Binary files a/gen/ui/tabLeftu.png and b/gen/ui/tabLeftu.png differ diff --git a/gen/ui/tabRight.png b/gen/ui/tabRight.png index 7fe635d..a8f8043 100644 Binary files a/gen/ui/tabRight.png and b/gen/ui/tabRight.png differ diff --git a/gen/ui/tabRightu.png b/gen/ui/tabRightu.png index bac7a7f..3714349 100644 Binary files a/gen/ui/tabRightu.png and b/gen/ui/tabRightu.png differ