Skip to content

Commit

Permalink
z3cform portlet is not fully supported yet, use old portlet style
Browse files Browse the repository at this point in the history
  • Loading branch information
kagesenshi committed Oct 30, 2013
1 parent ec03bfd commit f608e22
Showing 1 changed file with 21 additions and 5 deletions.
Expand Up @@ -2,7 +2,9 @@ from zope import schema
from zope.component import getMultiAdapter
from zope.formlib import form

from plone.app.portlets.browser import z3cformhelper
# XXX: Uncomment for z3cform
#from plone.app.portlets.browser import z3cformhelper

from z3c.form import field

from plone.formwidget.contenttree import ObjPathSourceBinder
Expand Down Expand Up @@ -44,15 +46,29 @@ class Renderer(base.Renderer):
def available(self):
return True

class AddForm(z3cformhelper.AddForm):
fields = field.Fields(${portlet_interfacename})
# XXX: z3cform
# class AddForm(z3cformhelper.AddForm):
class AddForm(base.AddForm):

# XXX: z3cform
# fields = field.Fields(${portlet_interfacename})

form_fields = form.Fields(${portlet_interfacename})

label = _(u"Add ${portlet_name}")
description = _(u"${portlet_description}")

def create(self, data):
return Assignment(**data)

class EditForm(z3cformhelper.EditForm):
fields = field.Fields(${portlet_interfacename})
# XXX: z3cform
# class EditForm(z3cformhelper.EditForm):
class EditForm(base.EditForm):

# XXX: z3cform
# fields = field.Fields(${portlet_interfacename})

form_fields = form.Fields(${portlet_interfacename})

label = _(u"Edit ${portlet_name}")
description = _(u"${portlet_description}")

0 comments on commit f608e22

Please sign in to comment.