Пример #1
0
 def payload(self):
     convert_request_form_to_unicode(self.request.form)
     self.update()
     form, action, status = SubFormGroupBase.updateActions(self)
     if action is None:
         form, action, status, FormCanvas.updateActions(self)
     if status is FAILURE:
         # Render correctly the validation errors
         for error in form.formErrors:
            self.send_message(error.title, type="error")
     SubFormGroupBase.updateWidgets(self)
     FormCanvas.updateWidgets(self)
     result = {'ifaces': ['form'],
               'success': status == SUCCESS,
               'forms': self.render()}
     portlets = queryMultiAdapter(
         (self.context, self.request, self), name='portlets')
     if portlets is not None:
         portlets.update()
         rendered_portlets = portlets.render().strip()
         if rendered_portlets:
             result['portlets'] = rendered_portlets
     return result
Пример #2
0
 def render(self):
     return FormCanvas.render(self)
Пример #3
0
 def update(self):
     grok.Viewlet.update(self)
     FormCanvas.update(self)
     self.updateForm()
Пример #4
0
 def __init__(self, context, request, view, manager):
     grok.Viewlet.__init__(self, context, request, view, manager)
     FormCanvas.__init__(self, context, request)
Пример #5
0
 def update(self):
     # We are interested by the viewlet manager feature
     # here. should we call super ?
     # grok.ViewletManager.update(self)
     FormCanvas.update(self)
     self.updateForm()
Пример #6
0
 def __init__(self, context, request, view):
     grok.ViewletManager.__init__(self, context, request, view)
     FormCanvas.__init__(self, context, request)
Пример #7
0
 def __init__(self, context, request):
     PageREST.__init__(self, context, request)
     FormCanvas.__init__(self, context, request)
Пример #8
0
 def __init__(self, context, request):
     PageREST.__init__(self, context, request)
     SubFormGroupBase.__init__(self, context, request)
     FormCanvas.__init__(self, context, request)