[gen] Bugfix: attribute Field.focus and UserWrapper password management.

This commit is contained in:
Gaetan Delannay 2012-06-02 20:55:25 +02:00
parent 77331cd216
commit 2710fb6c39
3 changed files with 8 additions and 4 deletions

View file

@ -681,8 +681,8 @@ class Type:
layouts['cell'].addCssClasses('noStyle')
if self.focus:
# We need to make it flashy
layouts['view'].addCssClasses('appyFocus')
layouts['edit'].addCssClasses('appyFocus')
layouts['view'].addCssClasses('focus')
layouts['edit'].addCssClasses('focus')
# If layouts are the default ones, set width=None instead of width=100%
# for the field if it is not in a group.
if areDefault and not self.group:

View file

@ -63,6 +63,9 @@ img { border: 0; vertical-align: middle}
width: 600px; border: 1px #F0C36D solid; padding: 6px 16px;
background-color: #F9EDBE; text-align: center;
border-radius: 2px 2px 2px 2px; box-shadow: 0 2px 4px #A9A9A9;}
.focus { font-size: 90%; padding: 6px 16px; background-color: #d7dee4;
border-radius: 2px 2px 2px 2px; box-shadow: 0 2px 4px #A9A9A9;}
.focus td { padding: 4px 0px 4px 4px }
.discreet { font-size: 90%; }
.portlet { width: 150px; border-right: 1px solid #5F7983;}
.portletContent { margin: 9px; }

View file

@ -110,8 +110,9 @@ class UserWrapper(AbstractWrapper):
zopeUser.roles = self.roles
# Update the password if the user has entered new ones.
rq = self.request
if rq.has_key('password1'): self.setPassword(rq['password1'])
self.password1 = self.password2 = ''
if rq.has_key('password1'):
self.setPassword(rq['password1'])
self.password1 = self.password2 = ''
# "self" must be owned by its Zope user.
if 'Owner' not in self.o.get_local_roles_for_userid(login):
self.o.manage_addLocalRoles(login, ('Owner',))