/** * editAction * @author Thomas Schedler <*****@*****.**> * @version 1.0 */ public function editAction() { $this->core->logger->debug('propterties->controllers->LocationController->editAction()'); $this->getForm($this->core->sysConfig->generic->actions->edit); /** * get form title */ $this->view->formtitle = $this->objForm->Setup()->getFormTitle(); if ($this->getRequest()->isPost() && $this->getRequest()->isXmlHttpRequest()) { $arrFormData = $this->getRequest()->getPost(); $this->objForm->Setup()->setFieldValues($arrFormData); /** * set action */ $this->objForm->setAction('/zoolu/properties/location/edit'); /** * prepare form (add fields and region to the Zend_Form) */ $this->objForm->prepareForm(); if ($this->objForm->isValid($arrFormData)) { $this->objForm->saveFormData(); $this->view->blnShowFormAlert = true; } } $this->view->form = $this->objForm; $this->renderScript('location/form.phtml'); }
/** * editAction * @author Cornelius Hansjakob <*****@*****.**> * @version 1.0 */ public function editAction() { $this->core->logger->debug('propterties->controllers->CategoryController->editAction()'); $this->getForm($this->core->sysConfig->generic->actions->edit); /** * get form title */ $this->view->formtitle = $this->objForm->Setup()->getFormTitle(); $this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages', $this->objForm->Setup()->getLanguageId()); if ($this->objRequest->isPost() && $this->objRequest->isXmlHttpRequest()) { $arrFormData = $this->objRequest->getPost(); $this->objForm->Setup()->setFieldValues($arrFormData); /** * set action */ $this->objForm->setAction('/zoolu/properties/category/edit'); /** * prepare form (add fields and region to the Zend_Form) */ $this->objForm->prepareForm(); if ($this->objForm->isValid($arrFormData)) { $this->objForm->saveFormData(); $this->view->blnShowFormAlert = true; } } $this->view->form = $this->objForm; $this->renderScript('category/form.phtml'); }
/** * editAction * @author Cornelius Hansjakob <*****@*****.**> * @version 1.0 */ public function editAction() { $this->core->logger->debug('contacts->controllers->MemberController->editAction()'); $this->getForm($this->core->sysConfig->generic->actions->edit); /** * get form title */ $this->view->formtitle = $this->objForm->Setup()->getFormTitle(); if ($this->getRequest()->isPost() && $this->getRequest()->isXmlHttpRequest()) { $arrFormData = $this->getRequest()->getPost(); $this->objForm->Setup()->setFieldValues($arrFormData); /** * set action */ $this->objForm->setAction('/zoolu/contacts/member/edit'); /** * prepare form (add fields and region to the Zend_Form) */ $this->objForm->prepareForm(); if ($this->objForm->isValid($arrFormData)) { $this->objForm->saveFormData(); $this->view->blnShowFormAlert = true; } } /** * output of metainformation to hidden div */ //$this->setViewMetaInfos(); $this->view->form = $this->objForm; $this->renderScript('form.phtml'); }
/** * editAction * @author Daniel Rotter <*****@*****.**> * @version 1.0 */ public function editAction() { $this->core->logger->debug('cms->controllers->WidgetController->editAction()'); try { $this->getForm($this->core->sysConfig->generic->actions->edit); $this->addWidgetSpecificFormElements(); $this->view->formtitle = $this->objForm->Setup()->getFormTitle(); if ($this->objRequest->isPost() && $this->objRequest->isXmlHttpRequest()) { $arrFormData = $this->objRequest->getPost(); $this->objForm->Setup()->setFieldValues($arrFormData); $this->objForm->Setup()->setElementId($arrFormData['elementId']); /** * 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(); } $this->objForm->setAction('/zoolu/cms/widget/edit'); $this->setViewMetaInfos(); $this->view->form = $this->objForm; $this->renderScript('page/form.phtml'); } catch (Exception $exc) { $this->core->logger->err($exc); } }
/** * editAction * @author Cornelius Hansjakob <*****@*****.**> * @version 1.0 */ public function editAction() { $this->core->logger->debug('core->controllers->FolderController->editAction()'); $this->getForm($this->core->sysConfig->generic->actions->edit); $this->addFolderSpecificFormElements(); /** * 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(); /** * set action */ $this->objForm->setAction('/zoolu/core/folder/edit'); if ($this->objForm->isValid($arrFormData)) { $this->objForm->saveFormData(); /** * update start page */ if (array_key_exists("rootLevelTypeId", $arrFormData) && $arrFormData["rootLevelTypeId"] == $this->core->sysConfig->root_level_types->portals) { $intFolderId = $this->objForm->Setup()->getElementId(); $intUserId = Zend_Auth::getInstance()->getIdentity()->id; $arrProperties = array('idUsers' => $intUserId, 'creator' => $this->objForm->Setup()->getCreatorId(), 'idStatus' => $this->objForm->Setup()->getStatusId(), 'showInNavigation' => $this->objForm->Setup()->getShowInNavigation(), 'changed' => date('Y-m-d H:i:s')); $arrTitle = array('idUsers' => $intUserId, 'creator' => $this->objForm->Setup()->getCreatorId(), 'title' => $this->objForm->Setup()->getCoreField('title')->getValue(), 'idLanguages' => $this->objForm->Setup()->getLanguageId(), 'changed' => date('Y-m-d H:i:s')); $this->getModelPages()->updateStartPageMainData($intFolderId, $arrProperties, $arrTitle); //$this->view->assign('selectNavigationItemNow', true); //$this->view->assign('itemId', 'folder'.$intFolderId); } $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(); } /** * output of metainformation to hidden div */ $this->setViewMetaInfos(); $this->view->form = $this->objForm; $this->renderScript('folder/form.phtml'); }
/** * 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; } }
/** * editAction * @author Cornelius Hansjakob <*****@*****.**> * @version 1.0 */ public function editAction() { $this->core->logger->debug('core->controllers->FolderController->editAction()'); $this->getForm($this->core->sysConfig->generic->actions->edit); $this->addFolderSpecificFormElements(); /** * 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(); /** * set action */ $this->objForm->setAction('/zoolu/core/folder/edit'); if ($this->objForm->isValid($arrFormData)) { $this->objForm->saveFormData(); /** * update the folder start element */ $arrArgs = array('LanguageId' => $this->objRequest->getParam("languageId", $this->core->intZooluLanguageId), 'GenericSetup' => $this->objForm->Setup()); $this->objCommandChain->runCommand('editFolderStartElement', $arrArgs); $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(); } /** * output of metainformation to hidden div */ $this->setViewMetaInfos(); $this->view->form = $this->objForm; $this->renderScript('folder/form.phtml'); }
/** * editsubwidgetAction * @author Daniel Rotter <*****@*****.**> * @version 1.0 */ public function editsubwidgetAction() { $this->core->logger->debug('widgets->blog->FormController->editsubwidgetAction()'); try { $this->getFormArticle($this->core->sysConfig->generic->actions->edit); $this->getBlogSpecificElements(); $this->view->formtitle = $this->objForm->Setup()->getFormTitle(); if ($this->objRequest->isPost() && $this->objRequest->isXmlHttpRequest()) { $arrFormData = $this->objRequest->getPost(); $this->objForm->Setup()->setFieldValues($arrFormData); $this->objForm->Setup()->setElementId($arrFormData['elementId']); $arrOldData = $this->getModelBlogEntry()->getBlogEntry($arrFormData['elementId']); $this->objForm->Setup()->setSubwidgetId($arrOldData['subwidgetId']); /** * Get the data for the updated entry */ $arrData = array('title' => $arrFormData['title'], 'text' => $arrFormData['text']); $this->getModelBlogEntry()->editBlogEntry($arrData, $arrFormData['elementId']); /** * 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(); } $this->objForm->updateSpecialFieldValues(); $this->objForm->setAction('/widget/blog/form/editsubwidget'); $this->setViewMetaInfos(); $this->view->form = $this->objForm; $this->renderScript('blog/form.phtml'); } catch (Exception $exc) { $this->core->logger->err($exc); } }
/** * buildProdcutLanguageVariant */ function buildProdcutLanguageVariant($objProduct) { global $objConsoleOpts, $core; // product form $objProductForm = new GenericForm(); $objProductForm->Setup()->setElementId($objProduct->id); $objProductForm->Setup()->setElementLinkId($objProduct->linkGlobalId); $objProductForm->Setup()->setFormId($objProduct->genericFormId); $objProductForm->Setup()->setTemplateId($objProduct->templateId); $objProductForm->Setup()->setFormVersion($objProduct->version); $objProductForm->Setup()->setActionType($core->sysConfig->generic->actions->edit); $objProductForm->Setup()->setLanguageId($objConsoleOpts->fromLanguageId); $objProductForm->Setup()->setFormLanguageId($core->sysConfig->languages->default->id); $objProductForm->Setup()->setModelSubPath('global/models/'); // load basic generic form $objProductForm->Setup()->loadGenericForm(); // load generic form structur $objProductForm->Setup()->loadGenericFormStructure(); // init data type object $objProductForm->initDataTypeObject(); // load data $objProductForm->loadFormData(); // set fallback language $objProductForm->Setup()->setLanguageFallbackId($objConsoleOpts->toLanguageId); // reset fields foreach ($objProductForm->Setup()->FieldNames() as $strField => $intType) { if ($strField != 'title' && $strField != 'internal_links_title' && $strField != 'internal_links' && $strField != 'category' && $strField != 'label') { $objProductForm->Setup()->getField($strField)->setValue(null); } } // reset multi regions foreach ($objProductForm->Setup()->MultiplyRegionIds() as $intRegionId) { $objProductForm->Setup()->getRegion($intRegionId)->resetRegionInstances(); } // set new language $objProductForm->saveFormData(); }
/** * buildProdcutLanguageVariant */ function buildProdcutLanguageVariant($objProduct) { global $objConsoleOpts, $core; // product form $objProductForm = new GenericForm(); $objProductForm->Setup()->setElementId($objProduct->id); $objProductForm->Setup()->setElementLinkId($objProduct->linkGlobalId); $objProductForm->Setup()->setFormId($objProduct->genericFormId); $objProductForm->Setup()->setTemplateId($objProduct->templateId); $objProductForm->Setup()->setFormVersion($objProduct->version); $objProductForm->Setup()->setActionType($core->sysConfig->generic->actions->edit); $objProductForm->Setup()->setLanguageId($objConsoleOpts->fromLanguageId); $objProductForm->Setup()->setFormLanguageId($core->sysConfig->languages->default->id); $objProductForm->Setup()->setModelSubPath('global/models/'); // load basic generic form $objProductForm->Setup()->loadGenericForm(); // load generic form structur $objProductForm->Setup()->loadGenericFormStructure(); // init data type object $objProductForm->initDataTypeObject(); // load data $objProductForm->loadFormData(); // set new language $objProductForm->Setup()->setLanguageId($objConsoleOpts->toLanguageId); //rest url if ($objProductForm->Setup()->getField('url')) { $objProductForm->Setup()->getField('url')->setValue(''); } // set new language $objProductForm->saveFormData(); }