from zope.interface import Interface, implements from zope import schema from waeup.plonetheme.ngren1 import _ from plone.app.users.userdataschema import IUserDataSchemaProvider from plone.app.users.userdataschema import IUserDataSchema def validateAccept(value): if not value == True: return False return True class UserDataSchemaProvider(object): implements(IUserDataSchemaProvider) def getSchema(self): """ """ return IEnhancedUserDataSchema class IEnhancedUserDataSchema(IUserDataSchema): """ Use all the fields from the default user data schema, and add various extra fields. """ position = schema.TextLine( title=_(u'label_position', default=u'Position'), description=_(u'help_position', default=u"Your WAeUP position (write-protected)"), required=False) company = schema.TextLine( title=_(u'label_company', default=u'Company'), description=_(u'help_company', default=u"The company you are working for"), required=False)