} // +----------------------------------------------------------------------+ // | Render | // +----------------------------------------------------------------------+ $dialog = new CMS_dialog(); $content = ''; $dialog->setTitle($cms_language->getMessage(MESSAGE_PAGE_TITLE_MODULE, array($cms_module->getLabel($cms_language))) . " :: " . $cms_language->getMessage(MESSAGE_PAGE_TITLE, false, MOD_CMS_FORMS_CODENAME)); $dialog->setBacklink("items.php?item=" . $item->getId()); if ($cms_message) { $dialog->setActionMessage($cms_message); } // Insert prefered text editor for textarea field $toolbarset = !$cms_module->getParameters("editor_toolbar") ? 'Basic' : $cms_module->getParameters("editor_toolbar"); $attrs = array('form' => 'frmitem', 'field' => 'source_' . $item->getID(), 'value' => $item->getAttribute('source'), 'language' => $cms_language, 'width' => 600, 'height' => 600, 'rows' => 8, 'toolbarset' => $toolbarset); $text_editor = CMS_textEditor::getEditorFromParams($attrs); $dialog->setJavascript($text_editor->getJavascript()); // Get listboxes for categories $a_all_categories = CMS_moduleCategories_catalog::getAllCategoriesAsArray($cms_user, $cms_module->getCodename(), $cms_language); if (!sizeof($a_all_categories)) { //user has no right on categories so he can't edit/create items header("Location: " . $cms_module->getAdminFrontendPath(PATH_RELATIVETO_WEBROOT) . "?cms_message_id=65&" . session_name() . "=" . session_id()); exit; } $s_categories_listboxes = CMS_moduleCategories_catalog::getListBoxes(array('field_name' => 'ids', 'items_possible' => $a_all_categories, 'items_selected' => $item_relations->getCategoriesIds(), 'select_width' => '250px', 'select_height' => '120px', 'form_name' => 'frmitem')); // Default check statuses for radios $public = array(); $public[1] = $item->getAttribute('public') === true ? ' checked="checked"' : ''; $public[0] = $item->getAttribute('public') === false ? ' checked="checked"' : ''; $content = ' <table border="0" cellpadding="3" cellspacing="2"> <form name="frmitem" action="' . $_SERVER["SCRIPT_NAME"] . '" method="post" enctype="multipart/form-data" onSubmit="getSelectedOptionsInField_ids();">