[gen] Graphical improvements.
|
@ -489,6 +489,7 @@ class ZopeGenerator(Generator):
|
||||||
msg('page_next', '', msg.PAGE_NEXT),
|
msg('page_next', '', msg.PAGE_NEXT),
|
||||||
msg('forgot_password', '', msg.FORGOT_PASSWORD),
|
msg('forgot_password', '', msg.FORGOT_PASSWORD),
|
||||||
msg('ask_password_reinit', '', msg.ASK_PASSWORD_REINIT),
|
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_mail_sent', '', msg.REINIT_MAIL_SENT),
|
||||||
msg('reinit_password', '', msg.REINIT_PASSWORD),
|
msg('reinit_password', '', msg.REINIT_PASSWORD),
|
||||||
msg('reinit_password_body', '', msg.REINIT_PASSWORD_BODY),
|
msg('reinit_password_body', '', msg.REINIT_PASSWORD_BODY),
|
||||||
|
|
|
@ -1116,6 +1116,8 @@ class ToolMixin(BaseMixin):
|
||||||
login = rq['login']
|
login = rq['login']
|
||||||
token = rq['token']
|
token = rq['token']
|
||||||
# Check if such token exists in temp folder
|
# Check if such token exists in temp folder
|
||||||
|
res = None
|
||||||
|
siteUrl = self.getSiteUrl()
|
||||||
tokenFile = os.path.join(getOsTempFolder(), login)
|
tokenFile = os.path.join(getOsTempFolder(), login)
|
||||||
if os.path.exists(tokenFile):
|
if os.path.exists(tokenFile):
|
||||||
f = file(tokenFile)
|
f = file(tokenFile)
|
||||||
|
@ -1131,13 +1133,15 @@ class ToolMixin(BaseMixin):
|
||||||
if not String.EMAIL.match(email):
|
if not String.EMAIL.match(email):
|
||||||
email = user.email
|
email = user.email
|
||||||
subject = self.translate('new_password')
|
subject = self.translate('new_password')
|
||||||
siteUrl = self.getSiteUrl()
|
|
||||||
map = {'password': newPassword, 'siteUrl': siteUrl}
|
map = {'password': newPassword, 'siteUrl': siteUrl}
|
||||||
body = self.translate('new_password_body', mapping=map,
|
body = self.translate('new_password_body', mapping=map,
|
||||||
format='text')
|
format='text')
|
||||||
sendMail(appyTool, email, subject, body)
|
sendMail(appyTool, email, subject, body)
|
||||||
os.remove(tokenFile)
|
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):
|
def getSearchValues(self, name, className):
|
||||||
'''Gets the possible values for selecting a value for searching field
|
'''Gets the possible values for selecting a value for searching field
|
||||||
|
|
|
@ -138,6 +138,15 @@ class PoMessage:
|
||||||
PAGE_NEXT = 'Next page'
|
PAGE_NEXT = 'Next page'
|
||||||
FORGOT_PASSWORD = 'Forgot password?'
|
FORGOT_PASSWORD = 'Forgot password?'
|
||||||
ASK_PASSWORD_REINIT = 'Ask new 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 ' \
|
REINIT_MAIL_SENT = 'A mail has been sent to you. Please follow the ' \
|
||||||
'instructions from this email.'
|
'instructions from this email.'
|
||||||
REINIT_PASSWORD = 'Password re-initialisation'
|
REINIT_PASSWORD = 'Password re-initialisation'
|
||||||
|
|
|
@ -62,7 +62,7 @@ img { border: 0; vertical-align: middle}
|
||||||
.fakeButton { border: 1px solid #D7DEE4; background-color: #fde8e0;
|
.fakeButton { border: 1px solid #D7DEE4; background-color: #fde8e0;
|
||||||
padding: 0px 8px 2px; font: italic 92% Helvetica,Arial,sans-serif}
|
padding: 0px 8px 2px; font: italic 92% Helvetica,Arial,sans-serif}
|
||||||
.message { position: absolute; top: -40px; left: 150px; font-size: 90%;
|
.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;
|
background-color: #F9EDBE; text-align: center;
|
||||||
border-radius: 2px 2px 2px 2px; box-shadow: 0 2px 4px #A9A9A9;}
|
border-radius: 2px 2px 2px 2px; box-shadow: 0 2px 4px #A9A9A9;}
|
||||||
.focus { font-size: 90%; margin: 7px; padding: 7px; background-color: #d7dee4;
|
.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;
|
.section3 { font-size: 100%; font-style: italic; font-weight: bold;
|
||||||
margin: 0.45em 0em 0.1em 0; background-color: #95a1b3;
|
margin: 0.45em 0em 0.1em 0; background-color: #95a1b3;
|
||||||
text-align: center; color: white; }
|
text-align: center; color: white; }
|
||||||
.odd { background-color: white; }
|
.odd { background-color: #f9f9f9; }
|
||||||
.even { background-color: #F4F5F6; }
|
.even { background-color: #f4f4f4; }
|
||||||
.summary {margin-bottom: 5px;}
|
.summary {margin-bottom: 5px;}
|
||||||
.objectTitle { font-size: 11pt; border-bottom: 3px solid grey;
|
.objectTitle { font-size: 11pt; border-bottom: 3px solid grey;
|
||||||
font-weight: bold;}
|
font-weight: bold;}
|
||||||
.by { padding-top: 5px;}
|
.by { padding-top: 5px;}
|
||||||
.workflow { text-align: center; border-top: 1px solid grey;
|
.workflow { text-align: center; border-top: 1px solid grey;
|
||||||
background-color: #f8f8f8;}
|
background-color: #ececec }
|
||||||
.underTitle { background-color: #F4F5F6;}
|
.underTitle { background-color: #e9e9e9 }
|
||||||
.objectNavigate { margin-top: 3px;}
|
.objectNavigate { margin-top: 3px;}
|
||||||
.underline { border-bottom: 1px dotted grey;}
|
.underline { border-bottom: 1px dotted grey;}
|
||||||
.state { font-weight: bold; border-bottom: 1px dashed grey;}
|
.state { font-weight: bold; border-bottom: 1px dashed grey;}
|
||||||
|
|
BIN
gen/ui/odt.png
Before Width: | Height: | Size: 784 B After Width: | Height: | Size: 791 B |
|
@ -322,5 +322,9 @@
|
||||||
This macro displays the global message on the page.
|
This macro displays the global message on the page.
|
||||||
</tal:comment>
|
</tal:comment>
|
||||||
<metal:message define-macro="message" tal:define="messages tool/consumeMessages" tal:condition="messages">
|
<metal:message define-macro="message" tal:define="messages tool/consumeMessages" tal:condition="messages">
|
||||||
<div class="message" tal:content="structure messages"></div>
|
<div class="message">
|
||||||
|
<span tal:replace="structure messages"></span>
|
||||||
|
<img tal:attributes="src python: '%s/ui/close.png' % appUrl"
|
||||||
|
align="right" style="cursor:pointer" onClick="this.parentNode.style.display='none'"/>
|
||||||
|
</div>
|
||||||
</metal:message>
|
</metal:message>
|
||||||
|
|
BIN
gen/ui/tabBg.png
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 197 B |