/** * editAction * @author Thomas Schedler <*****@*****.**> * @version 1.0 */ public function editAction() { $this->core->logger->debug('global->controllers->ElementController->editAction()'); try { $this->getForm($this->core->sysConfig->generic->actions->edit); $this->addGlobalSpecificFormElements(); /** * get form title */ $this->view->formtitle = $this->objForm->Setup()->getFormTitle(); if ($this->objRequest->isPost() && $this->objRequest->isXmlHttpRequest()) { $arrFormData = $this->objRequest->getPost(); $this->objForm->Setup()->setFieldValues($arrFormData); /** * prepare form (add fields and region to the Zend_Form) */ $this->objForm->prepareForm(); if ($this->objForm->isValid($arrFormData)) { $this->objForm->saveFormData(); $this->view->assign('blnShowFormAlert', true); } else { $this->view->assign('blnShowFormAlert', false); } } else { /** * prepare form (add fields and region to the Zend_Form) */ $this->objForm->prepareForm(); } /** * update special field values */ $this->objForm->updateSpecificFieldValues(); /** * set action */ $this->objForm->setAction('/zoolu/global/element/edit'); /** * output of metainformation to hidden div */ $this->setViewMetaInfos(); $this->view->form = $this->objForm; $this->renderScript('element/form.phtml'); } catch (Exception $exc) { $this->core->logger->err($exc); exit; } }