/** * Constuctor * * @param string $caption caption * @param string $name name * @param string $value initial content * @param int $rows number of rows * @param int $cols number of columns */ function __construct($caption, $name, $configs = null, $nohtml = false, $OnFailure = "") { $configs["name"] = $name; $this->setCaption($caption); $this->setName($name); /*$this->_rows = intval($rows); $this->_cols = intval($cols); $this->setValue($value); */ $editor_handler = Xmf_Form_Element_Editor_Handler::getInstance(); $this->editor = $editor_handler->get($configs["editor"], $configs, $nohtml, $OnFailure); }
function render() { $editor_handler = Xmf_Form_Element_Editor_Handler::getInstance(); $editor_handler->allowed_editors = $this->allowed_editors; $option_select = new Xmf_Form_Element_Select("", $this->name, $this->value); $extra = 'onchange="if(this.options[this.selectedIndex].value.length > 0 ){ window.document.forms.' . $this->form->getName() . '.submit(); }"'; $option_select->setExtra($extra); $option_select->addOptionArray($editor_handler->getList($this->nohtml)); $this->addElement($option_select); return parent::render(); }