Changeset 7197 for main


Ignore:
Timestamp:
25 Nov 2011, 08:32:43 (13 years ago)
Author:
Henrik Bettermann
Message:

Do not fill user description automatically.

Hide user description in user edit mode. We could use the description field also for notices appearing in a user notice box on the left (to be implemented).

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/authentication.py

    r7193 r7197  
    8888        if title is None:
    8989            title = name
    90         if description is None:
    91             description = title
     90        #if description is None:
     91        #    description = title
    9292        self.title = title
    9393        self.description = description
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r7195 r7197  
    348348        return "Edit user %s" % self.context.__name__
    349349
     350    def setUpWidgets(self, ignore_request=False):
     351        super(UserManageFormPage,self).setUpWidgets(ignore_request)
     352        self.widgets['title'].displayWidth = 30
     353        self.widgets['description'].height = 3
     354
    350355    @grok.action('Save')
    351356    def save(self, **data):
     
    376381    grok.name('index')
    377382    grok.require('waeup.editUser')
    378     form_fields = grok.AutoFields(IUserAccount).omit('name', 'roles')
     383    form_fields = grok.AutoFields(IUserAccount).omit(
     384        'name', 'description', 'roles')
    379385    label = u"My Preferences"
     386
     387    def setUpWidgets(self, ignore_request=False):
     388        super(UserManageFormPage,self).setUpWidgets(ignore_request)
     389        self.widgets['title'].displayWidth = 30
    380390
    381391    def title(self):
  • main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py

    r7193 r7197  
    200200        description = u'Real name of user',
    201201        required = False,)
    202     description = schema.TextLine(
    203         title = u'Description',
     202    description = schema.Text(
     203        title = u'Description/Notice',
    204204        required = False,)
    205205    roles = schema.List(
  • main/waeup.sirp/trunk/src/waeup/sirp/userscontainer.py

    r7193 r7197  
    3636        if title is None:
    3737            title = name
    38         if description is None:
    39             description = title
     38        #if description is None:
     39        #    description = title
    4040        self[name] = Account(name, password, title, description, roles)
    4141
  • main/waeup.sirp/trunk/src/waeup/sirp/userscontainer.txt

    r7172 r7197  
    4040
    4141    >>> bob.description
    42     'bob'
    4342
    44 As we did not give a title nor description, the name was taken instead
    45 for these values. The password, however, is stored encoded:
     43
     44As we did not give a title, the name was taken instead
     45for title (but not for description). The password, however, is stored encoded:
    4646
    4747    >>> bob.password
Note: See TracChangeset for help on using the changeset viewer.