function render() { $this->js(true)->_load('tinymce/tinymce.min')->_load('tinymce/jquery.tinymce.min')->_load('tinymce/xepan4.tinymce'); // $this->js(true)->_load('tinymce/tinymce.min')->_load('tinymce/jquery.tinymce.min')->tinymce(); $this->js(true)->univ()->xtinymce($this, $this->options); // $this->js(true)->univ()->createRTE(array( // 'toolbar'=>'maxi', // 'cssfiles'=> array('templates/default/css/epan.css') // ) // ); parent::render(); }
/** * Get form * * @return Form_Form */ private function getForm() { $form = new Form_Form("install"); $validator = new Form_Validator_Required(); $validator->setErrorMessage(t("form.validator.required")); $field = new Form_Field_Hidden("install", ""); $field->setDefaultValue(1); $form->addField($field); $field = new Form_Field_Text("mysql-host", t("install.host")); $field->addValidator($validator); $field->setDefaultValue("localhost"); $form->addField($field); $field = new Form_Field_Text("mysql-db", t("install.db")); $field->addValidator($validator); $field->setDefaultValue("nreeda"); $form->addField($field); $field = new Form_Field_Text("mysql-user", t("install.user")); $field->addValidator($validator); $field->setDefaultValue("nreeda"); $form->addField($field); $field = new Form_Field_Password("mysql-pass", t("install.pw")); $form->addField($field); $field = new Form_Field_Text("admin-user", t("install.admin.user")); $field->addValidator($validator); $form->addField($field); $field = new Form_Field_Password("admin-pass", t("install.admin.pw")); $field->addValidator($validator); $form->addField($field); return $form; }
function render() { if (!self::$js_added) { switch ($this->config->getEditorType()) { case Config::EDITOR_TYPE_GME: $this->app->jquery->addStaticInclude('gme/button-bar'); $this->js(true)->_load('gme/dropzone')->_load('gme/ghostdown')->_load('atk4_markdown')->_css('gme/ghostdown')->_css('gme/dropzone'); break; /*case Config::EDITOR_TYPE_WP: $this->app->jquery ->addStaticInclude('wp/markdown') ->addStaticInclude('wp/prettify') ->addStaticInclude('wp/pagedown/markdown-converter') ->addStaticInclude('wp/pagedown/markdown-editor') ->addStaticInclude('wp/pagedown/markdown-sanitizer') ->addStaticInclude('atk4_markdown') ->addStaticStylesheet('wp/markdown-editor') ->addStaticStylesheet('wp/prettify') ; break;*/ /*case Config::EDITOR_TYPE_WP: $this->app->jquery ->addStaticInclude('wp/markdown') ->addStaticInclude('wp/prettify') ->addStaticInclude('wp/pagedown/markdown-converter') ->addStaticInclude('wp/pagedown/markdown-editor') ->addStaticInclude('wp/pagedown/markdown-sanitizer') ->addStaticInclude('atk4_markdown') ->addStaticStylesheet('wp/markdown-editor') ->addStaticStylesheet('wp/prettify') ; break;*/ case Config::EDITOR_TYPE_JMN: $this->app->jquery->addStaticInclude('wp/markdown')->addStaticInclude('wp/prettify')->addStaticInclude('wp/pagedown/markdown-converter')->addStaticInclude('wp/pagedown/markdown-editor')->addStaticInclude('wp/pagedown/markdown-sanitizer')->addStaticInclude('atk4_markdown')->addStaticStylesheet('wp/markdown-editor')->addStaticStylesheet('wp/prettify'); break; default: throw $this->exception('Not supported'); } self::$js_added = true; } parent::render(); }
function render() { $this->js(true)->_load('tinymce.min')->_load('jquery.tinymce.min')->_load('xepan-richtext-admin'); $this->js(true)->univ()->richtext($this, $this->options); parent::render(); }
/** * Get form * * @return Form_Form */ public function getForm() { $form = new Form_Form("rss"); $form->attr->add("method", "get"); $validatorNumber = new Form_Validator_Regex(); $validatorNumber->setErrorMessage(t("rss.10")); $validatorNumber->setRegex("^[0-9]+\$", ""); $field = new Form_Field_Text("title", t("rss.4")); $field->setDefaultValue("nReeda RSS"); $field->attr->add("style", "width:95%;"); $form->addField($field); $validator = new Form_Validator_Required(); $validator->setErrorMessage(t("form.validator.required")); $field->addValidator($validator); $field = new Form_Field_Text("desc", t("rss.5")); $field->attr->add("style", "width:95%;"); $form->addField($field); $field = new Form_Field_Text("max", t("rss.6")); $field->setDefaultValue("50"); $field->attr->add("size", 6); $field->addValidator($validatorNumber); $form->addField($field); $field = new Form_Field_Text("catmax", t("rss.7")); $field->setDefaultValue("0"); $field->attr->add("size", 6); $field->addValidator($validatorNumber); $form->addField($field); $field = new Form_Field_Text("feedmax", t("rss.8")); $field->setDefaultValue("0"); $field->attr->add("size", 6); $field->addValidator($validatorNumber); $form->addField($field); return $form; }
/** * Get form * * @return Form_Form */ public function getForm() { $form = new Form_Form("user"); $field = new Form_Field_Hidden("save"); $field->setDefaultValue(1); $form->addField($field); $field = new Form_Field_Text("username", t("username")); $field->setDefaultValue($this->user->username); $field->setDbObjectMember($this->user); $form->addField($field); $field = new Form_Field_Password("password", t("password")); if (!$this->user->getId()) { $field->setDbObjectMember($this->user); } $form->addField($field); $field = new Form_Field_Password("password2", t("settings.3")); if (!$this->user->getId()) { $field->setDbObjectMember($this->user, "password"); } $form->addField($field); $field = new Form_Field_Select("role", t("admin.user.5")); $field->setDbObjectMember($this->user); $field->addOption(RDR_User::ROLE_USER, t("user." . RDR_User::ROLE_USER)); $field->addOption(RDR_User::ROLE_ADMIN, t("user." . RDR_User::ROLE_ADMIN)); $field->setDefaultValue($this->user->role); $form->addField($field); return $form; }