Last change
on this file since 16250 was
5873,
checked in by Henrik Bettermann, 14 years ago
|
Add company to user data and show on members page.
|
-
Property svn:keywords set to
Id
|
File size:
1.1 KB
|
Rev | Line | |
---|
[5870] | 1 | from zope.interface import Interface, implements |
---|
| 2 | from zope import schema |
---|
| 3 | |
---|
| 4 | from waeup.plonetheme import _ |
---|
| 5 | from plone.app.users.userdataschema import IUserDataSchemaProvider |
---|
| 6 | from plone.app.users.userdataschema import IUserDataSchema |
---|
| 7 | |
---|
| 8 | def validateAccept(value): |
---|
| 9 | if not value == True: |
---|
| 10 | return False |
---|
| 11 | return True |
---|
| 12 | |
---|
| 13 | class UserDataSchemaProvider(object): |
---|
| 14 | implements(IUserDataSchemaProvider) |
---|
| 15 | |
---|
| 16 | def getSchema(self): |
---|
| 17 | """ |
---|
| 18 | """ |
---|
| 19 | return IEnhancedUserDataSchema |
---|
| 20 | |
---|
| 21 | class IEnhancedUserDataSchema(IUserDataSchema): |
---|
| 22 | """ Use all the fields from the default user data schema, and add various |
---|
| 23 | extra fields. |
---|
| 24 | """ |
---|
| 25 | |
---|
| 26 | position = schema.TextLine( |
---|
| 27 | title=_(u'label_position', default=u'Position'), |
---|
| 28 | description=_(u'help_position', |
---|
[5872] | 29 | default=u"Your WAeUP position (write-protected)"), |
---|
[5870] | 30 | required=False) |
---|
[5873] | 31 | |
---|
| 32 | company = schema.TextLine( |
---|
| 33 | title=_(u'label_company', default=u'Company'), |
---|
| 34 | description=_(u'help_company', |
---|
| 35 | default=u"The company you are working for"), |
---|
| 36 | required=False) |
---|
[5870] | 37 | |
---|
Note: See
TracBrowser for help on using the repository browser.