/** * Creates a form to update placeholder in the database * * @return string * @autoTestable * @permissions right3 */ protected function actionUpdatePlaceholder() { $strReturn = ""; $strReturn .= $this->objToolkit->warningBox($this->getLang("quickhelp_update_placeholder")); $strReturn .= $this->objToolkit->getTextRow($this->getLang("plUpdateHelp")); $strReturn .= $this->objToolkit->divider(); if ($this->getParam("plToUpdate") == "") { $strReturn .= $this->objToolkit->formHeader(class_link::getLinkAdminHref($this->getArrModule("modul"), "updatePlaceholder")); //Load the available templates $arrTemplates = class_resourceloader::getInstance()->getTemplatesInFolder("/module_pages"); $arrTemplatesDD = array(); $arrTemplatesDD[-1] = $this->getLang("plUpdateAll"); if (count($arrTemplates) > 0) { foreach ($arrTemplates as $strTemplate) { $arrTemplatesDD[$strTemplate] = $strTemplate; } } $strReturn .= $this->objToolkit->formInputDropdown("template", $arrTemplatesDD, $this->getLang("template")); $strReturn .= $this->objToolkit->formInputText("plToUpdate", $this->getLang("plToUpdate")); $strReturn .= $this->objToolkit->formInputText("plNew", $this->getLang("plNew")); $strReturn .= $this->objToolkit->formInputSubmit($this->getLang("plRename")); $strReturn .= $this->objToolkit->formClose(); } else { if (class_module_pages_pageelement::updatePlaceholders($this->getParam("template"), $this->getParam("plToUpdate"), $this->getParam("plNew"))) { $strReturn .= $this->objToolkit->getTextRow($this->getLang("plUpdateTrue")); } else { $strReturn .= $this->objToolkit->getTextRow($this->getLang("plUpdateFalse")); } } return $strReturn; }