def edit(self): self.ResetFlashMessages() form = ObjectForm(view=self, loadFromType=self.context.configuration) form.use_ajax = True form.Setup(subset="edit") result, data, action = form.Process(redirectSuccess="page_url") return {u"content": data, u"result": result, u"cmsview":self, u"head": form.HTMLHead()}
def add(self): self.ResetFlashMessages() typeID = self.GetFormValue("pool_type") if not typeID: return {u"content": u"", u"showAddLinks": True, u"result": True, u"head": u""} form = ObjectForm(view=self, loadFromType=typeID) form.Setup(subset="create", addTypeField=True) form.use_ajax = True result, data, action = form.Process(redirectSuccess="page_url") return {u"content": data, u"result": result, u"cmsview": self, u"showAddLinks": False, u"head": form.HTMLHead()}
def edit(self): form = ObjectForm(view=self, loadFromType=self.context.configuration) form.use_ajax = True form.Setup(subset="edit") head = form.HTMLHead() result, data, action = form.Process(redirectSuccess="page_url") return { u"content": data, u"result": result, u"cmsview": self, u"head": head }
def add(self): typeID = self.GetFormValue("pool_type") if not typeID: return { u"content": u"", u"showAddLinks": True, u"result": True, u"head": u"" } form = ObjectForm(view=self, loadFromType=typeID) form.Setup(subset="create", addTypeField=True) form.use_ajax = True head = form.HTMLHead() result, data, action = form.Process(redirectSuccess="page_url") return { u"content": data, u"result": result, u"cmsview": self, u"showAddLinks": False, u"head": head }