use new Jeep convenience methods for position of fields on schemas
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2110 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
907dda565a
commit
a5847a6fb2
2 changed files with 16 additions and 18 deletions
|
@ -64,17 +64,17 @@ class MyStuff(ConceptView):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
||||||
class PasswordWidget(BasePasswordWidget):
|
#class PasswordWidget(BasePasswordWidget):
|
||||||
|
#
|
||||||
def getInputValue(self):
|
# def getInputValue(self):
|
||||||
value = super(PasswordWidget, self).getInputValue()
|
# value = super(PasswordWidget, self).getInputValue()
|
||||||
confirm = self.request.get('form.passwordConfirm')
|
# confirm = self.request.get('form.passwordConfirm')
|
||||||
if confirm != value:
|
# if confirm != value:
|
||||||
v = _(u'Password and password confirmation do not match.')
|
# v = _(u'Password and password confirmation do not match.')
|
||||||
self._error = WidgetInputError(
|
# self._error = WidgetInputError(
|
||||||
self.context.__name__, self.label, v)
|
# self.context.__name__, self.label, v)
|
||||||
raise self._error
|
# raise self._error
|
||||||
return value
|
# return value
|
||||||
|
|
||||||
|
|
||||||
class MemberRegistration(NodeView, CreateForm):
|
class MemberRegistration(NodeView, CreateForm):
|
||||||
|
@ -100,8 +100,8 @@ class MemberRegistration(NodeView, CreateForm):
|
||||||
@Lazy
|
@Lazy
|
||||||
def schema(self):
|
def schema(self):
|
||||||
schema = super(MemberRegistration, self).schema
|
schema = super(MemberRegistration, self).schema
|
||||||
if 'birthDate' in schema.fields:
|
schema.fields.remove('birthDate')
|
||||||
del schema.fields['birthDate']
|
schema.fields.reorder(-2, 'loginName')
|
||||||
return schema
|
return schema
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
|
|
|
@ -44,9 +44,8 @@ class FileSchemaFactory(SchemaFactory):
|
||||||
|
|
||||||
def __call__(self, interface, **kw):
|
def __call__(self, interface, **kw):
|
||||||
schema = super(FileSchemaFactory, self).__call__(interface, **kw)
|
schema = super(FileSchemaFactory, self).__call__(interface, **kw)
|
||||||
if ('request' in kw and kw['request'].principal.id != 'rootadmin'
|
if 'request' in kw and kw['request'].principal.id != 'rootadmin':
|
||||||
and 'contentType' in schema.fields.keys()):
|
schema.fields.remove('contentType')
|
||||||
del schema.fields['contentType']
|
|
||||||
return schema
|
return schema
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,8 +55,7 @@ class NoteSchemaFactory(SchemaFactory):
|
||||||
|
|
||||||
def __call__(self, interface, **kw):
|
def __call__(self, interface, **kw):
|
||||||
schema = super(NoteSchemaFactory, self).__call__(interface, **kw)
|
schema = super(NoteSchemaFactory, self).__call__(interface, **kw)
|
||||||
del schema.fields['description']
|
schema.fields.remove('description')
|
||||||
schema.fields.data.height = 5
|
schema.fields.data.height = 5
|
||||||
return schema
|
return schema
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue