/** * create */ function createObject() { global $rbacsystem, $lng, $tpl, $ilHelp; $forms = array(); $ilHelp->setScreenIdComponent("sty"); $ilHelp->setDefaultScreenId(ilHelpGUI::ID_PART_SCREEN, "create"); // --- create include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt("sty_create_new_stylesheet")); // title $ti = new ilTextInputGUI($this->lng->txt("title"), "style_title"); $ti->setMaxLength(128); $ti->setSize(40); $ti->setRequired(true); $form->addItem($ti); // description $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "style_description"); $ta->setCols(40); $ta->setRows(2); $form->addItem($ta); $form->addCommandButton("save", $this->lng->txt("save")); $form->addCommandButton("cancel", $this->lng->txt("cancel")); $forms[] = $form; // --- import include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt("sty_import_stylesheet")); // title $ti = new ilFileInputGUI($this->lng->txt("import_file"), "stylefile"); $ti->setRequired(true); $form->addItem($ti); $form->addCommandButton("importStyle", $this->lng->txt("import")); $form->addCommandButton("cancel", $this->lng->txt("cancel")); $forms[] = $form; // --- clone include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt("sty_copy_other_stylesheet")); // source $ti = new ilSelectInputGUI($this->lng->txt("sty_source"), "source_style"); $ti->setRequired(true); $ti->setOptions(ilObjStyleSheet::_getClonableContentStyles()); $form->addItem($ti); $form->addCommandButton("copyStyle", $this->lng->txt("copy")); $form->addCommandButton("cancel", $this->lng->txt("cancel")); $forms[] = $form; $this->tpl->setContent($this->getCreationFormsHTML($forms)); }