/** * 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 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 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); } }
/** * editwidgetpropertiesAction * @author Daniel Rotter <*****@*****.**> * @version 1.0 */ public function editwidgetpropertiesAction() { $this->core->logger->debug('widget->blog->FormController->editwidgetpropertiesAction()'); try { $this->getFormProperties($this->core->sysConfig->generic->actions->edit); $this->view->formtitle = $this->objForm->Setup()->getFormTitle(); if ($this->objRequest->isPost() && $this->objRequest->isXmlHttpRequest()) { $arrFormData = $this->objRequest->getPost(); $this->objForm->Setup()->setFieldValues($arrFormData); foreach ($arrFormData as $strKey => $strValue) { if (preg_match('/^' . self::PREFIX_PROPERTY . '/', $strKey)) { $strProperty = substr($strKey, strlen(self::PREFIX_PROPERTY), strlen($strKey) - strlen(self::PREFIX_PROPERTY)); $this->getModelWidgetProperties()->updateProperty($strProperty, $strValue, $arrFormData['idWidgetInstances']); } } $this->objForm->prepareForm(); if ($this->objForm->isValid($arrFormData)) { $this->view->assign('blnShowFormAlert', true); } else { $this->view->assign('blnShowFormAlert', false); } } else { $this->objForm->prepareForm(); } $this->objForm->setAction('/../widget/blog/form/editwidgetproperties'); $this->view->form = $this->objForm; $this->renderScript('blog/empty.phtml'); } catch (Excpetion $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 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 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'); }
/** * changetypeAction * @author Thomas Schedler <*****@*****.**> * @version 1.0 */ public function changetypeAction() { $this->core->logger->debug('global->controllers->ElementController->changetypeAction()'); try { $strGroupKey = $this->objRequest->getParam('rootLevelGroupKey'); $strGroupKeyLink = $strGroupKey . '_link'; $strGroupKeyOverview = $strGroupKey . '_overview'; if ($this->objRequest->getParam('elementTypeId') != '' && $this->objRequest->getParam('elementTypeId') > 0) { switch ($this->objRequest->getParam('elementTypeId')) { case $this->core->sysConfig->global_types->{$strGroupKey}->id: $this->objRequest->setParam('formId', ''); if ($this->objRequest->getParam('isStartGlobal') == 'true' && $this->objRequest->getParam('parentTypeId') == $this->core->sysConfig->parent_types->rootlevel) { $this->objRequest->setParam('templateId', $this->core->sysConfig->global_types->{$strGroupKey}->default_templateId); } else { if ($this->objRequest->getParam('isStartGlobal') == 'true') { $this->objRequest->setParam('templateId', $this->core->sysConfig->global_types->{$strGroupKey}->default_templateId); } else { $this->objRequest->setParam('templateId', $this->core->sysConfig->global_types->{$strGroupKey}->default_templateId); } } break; case $this->core->sysConfig->global_types->{$strGroupKeyOverview}->id: $this->objRequest->setParam('formId', ''); $this->objRequest->setParam('templateId', $this->core->sysConfig->global_types->{$strGroupKeyOverview}->default_templateId); break; case $this->core->sysConfig->global_types->{$strGroupKeyLink}->id: $this->objRequest->setParam('formId', $this->core->sysConfig->global_types->{$strGroupKeyLink}->default_formId); break; } } $this->getForm($this->core->sysConfig->generic->actions->edit); /** * load generic data */ $this->objForm->loadFormData(); /** * overwrite now the global type */ $this->objForm->Setup()->setElementTypeId($this->objRequest->getParam('elementTypeId')); $this->addGlobalSpecificFormElements(); /** * set action */ if (intval($this->objRequest->getParam('id')) > 0) { $this->objForm->setAction('/zoolu/global/element/edit'); } else { $this->objForm->setAction('/zoolu/global/element/add'); } /** * prepare form (add fields and region to the Zend_Form) */ $this->objForm->prepareForm(); /** * get form title */ $this->view->formtitle = $this->objForm->Setup()->getFormTitle(); /** * 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; } }
/** * changetypeAction * @author Thomas Schedler <*****@*****.**> * @version 1.0 */ public function changetypeAction() { $this->core->logger->debug('cms->controllers->PageController->changetypeAction()'); try { if ($this->objRequest->getParam('pageTypeId') != '' && $this->objRequest->getParam('pageTypeId') > 0) { switch ($this->objRequest->getParam('pageTypeId')) { case $this->core->sysConfig->page_types->page->id: $this->objRequest->setParam('formId', ''); if ($this->objRequest->getParam('isStartPage') == 'true' && $this->objRequest->getParam('parentTypeId') == $this->core->sysConfig->parent_types->rootlevel) { $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->page->portal_startpage_templateId); } else { if ($this->objRequest->getParam('isStartPage') == 'true') { $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->page->startpage_templateId); } else { $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->page->default_templateId); } } break; case $this->core->sysConfig->page_types->link->id: $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->link->default_formId); break; case $this->core->sysConfig->page_types->overview->id: $this->objRequest->setParam('formId', ''); $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->overview->default_templateId); break; case $this->core->sysConfig->page_types->external->id: $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->external->default_formId); break; case $this->core->sysConfig->page_types->process->id: $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->process->default_formId); $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->process->default_templateId); break; case $this->core->sysConfig->page_types->collection->id: $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->collection->default_formId); $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->collection->default_templateId); break; case $this->core->sysConfig->page_types->product_tree->id: $this->objRequest->setParam('formId', ''); $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->product_tree->default_templateId); break; case $this->core->sysConfig->page_types->press_area->id: $this->objRequest->setParam('formId', ''); $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->press_area->default_templateId); break; case $this->core->sysConfig->page_types->courses->id: $this->objRequest->setParam('formId', ''); $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->courses->default_templateId); break; case $this->core->sysConfig->page_types->events->id: $this->objRequest->setParam('formId', ''); $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->events->default_templateId); break; case $this->core->sysConfig->page_types->iframe->id: $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->iframe->default_formId); $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->iframe->default_templateId); break; case $this->core->sysConfig->page_types->download_center->id: $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->download_center->default_formId); $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->download_center->default_templateId); break; case $this->core->sysConfig->page_types->sitemap->id: $this->objRequest->setParam('formId', $this->core->sysConfig->page_types->sitemap->default_formId); $this->objRequest->setParam('templateId', $this->core->sysConfig->page_types->sitemap->default_templateId); break; } } $this->getForm($this->core->sysConfig->generic->actions->edit); /** * load generic data */ $this->objForm->loadFormData(); /** * overwrite now the page type */ $this->objForm->Setup()->setElementTypeId($this->objRequest->getParam('pageTypeId')); $this->addPageSpecificFormElements(); /** * set action */ if (intval($this->objRequest->getParam('id')) > 0) { $this->objForm->setAction('/zoolu/cms/page/edit'); } else { $this->objForm->setAction('/zoolu/cms/page/add'); } /** * prepare form (add fields and region to the Zend_Form) */ $this->objForm->prepareForm(); /** * get form title */ $this->view->formtitle = $this->objForm->Setup()->getFormTitle(); /** * output of metainformation to hidden div */ $this->setViewMetaInfos(); $this->view->form = $this->objForm; $this->renderScript('page/form.phtml'); } catch (Exception $exc) { $this->core->logger->err($exc); exit; } }