[gen] Graphical improvements.

This commit is contained in:
Gaetan Delannay 2012-09-19 17:48:49 +02:00
parent b985b5998d
commit d799398de1
12 changed files with 26 additions and 8 deletions

View file

@ -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),

View file

@ -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

View file

@ -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'

View file

@ -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;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

After

Width:  |  Height:  |  Size: 791 B

View file

@ -322,5 +322,9 @@
This macro displays the global message on the page.
</tal:comment>
<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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 197 B