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
def render(self): return FormCanvas.render(self)
def update(self): grok.Viewlet.update(self) FormCanvas.update(self) self.updateForm()
def __init__(self, context, request, view, manager): grok.Viewlet.__init__(self, context, request, view, manager) FormCanvas.__init__(self, context, request)
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()
def __init__(self, context, request, view): grok.ViewletManager.__init__(self, context, request, view) FormCanvas.__init__(self, context, request)
def __init__(self, context, request): PageREST.__init__(self, context, request) FormCanvas.__init__(self, context, request)
def __init__(self, context, request): PageREST.__init__(self, context, request) SubFormGroupBase.__init__(self, context, request) FormCanvas.__init__(self, context, request)