minor changes to support wysiwyg schema editor

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2005 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2007-09-06 16:05:18 +00:00
parent fa535ce0dc
commit 64e966182c
2 changed files with 7 additions and 0 deletions

View file

@ -35,6 +35,8 @@ class SchemaView(BaseView):
formState = FormState()
isManageMode = False
@Lazy
def fields(self):
return self.context.fields
@ -62,6 +64,10 @@ class SchemaView(BaseView):
return data
def update(self):
if self.isManageMode:
# Don't store anything when editing
self.request.response.redirect(self.nextUrl())
return False
newClient = False
form = self.request.form
clientName = self.getClientName()

View file

@ -53,6 +53,7 @@ class Instance(BaseInstance):
continue
fi = f.getFieldInstance()
name = f.name
#value = getattr(self.context, name, field.default)
value = getattr(self.context, name, u'')
value = (mode == 'view' and fi.display(value)) or fi.marshall(value)
result[name] = value