本文整理汇总了PHP中Am_Form_Admin::addHtmlEditor方法的典型用法代码示例。如果您正苦于以下问题:PHP Am_Form_Admin::addHtmlEditor方法的具体用法?PHP Am_Form_Admin::addHtmlEditor怎么用?PHP Am_Form_Admin::addHtmlEditor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Am_Form_Admin
的用法示例。
在下文中一共展示了Am_Form_Admin::addHtmlEditor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createForm
function createForm()
{
$form = new Am_Form_Admin();
$form->addText('title', array('class' => 'el-wide'))->setLabel(___('Title'))->addRule('required', 'This field is required');
$form->addText('desc', array('class' => 'el-wide'))->setLabel(___('Description'));
$form->addText('path', array('class' => 'el-wide'))->setId('page-path')->setLabel(___("Path\n" . 'will be used to construct user-friendly url, in case of you leave ' . 'it empty aMember will use id of this page to do it'));
$root_url = Am_Controller::escape(Am_Di::getInstance()->config->get('root_url'));
$form->addStatic()->setLabel(___('Permalink'))->setContent(<<<CUT
<div data-root_url="{$root_url}" id="page-permalink"></div>
CUT
);
$form->addScript()->setScript(<<<CUT
\$('#page-path').bind('keyup', function(){
\$('#page-permalink').closest('.row').toggle(\$(this).val() != '');
\$('#page-permalink').html(\$('#page-permalink').data('root_url') + '/page/' + encodeURIComponent(\$(this).val()).replace(/%20/g, '+'))
}).trigger('keyup')
CUT
);
$form->addAdvCheckbox('hide')->setLabel(___("Hide\n" . "do not display this item link in members area"));
$placeholder_items =& $options['placeholder_items'];
foreach ($this->getUserTagOptions() as $k => $v) {
$placeholder_items[] = array($v, $k);
}
$form->addHtmlEditor('html')->setMceOptions($options);
$form->addAdvCheckbox('use_layout')->setId('use-layout')->setLabel(___("Display inside layout\nWhen displaying to customer, will the\nheader/footer from current theme be displayed?"));
$form->addSelect('tpl')->setId('use-layout-tpl')->setLabel(___("Template\nalternative template for this page") . "\n" . ___("aMember will look for templates in [application/default/views/] folder\n" . "and in theme's [/] folder\n" . "and template filename must start with [layout]"))->loadOptions($this->getTemplateOptions());
$form->addScript()->setScript(<<<CUT
\$('#use-layout').change(function(){
\$('#use-layout-tpl').closest('.row').toggle(this.checked);
}).change()
CUT
);
$form->addElement(new Am_Form_Element_ResourceAccess())->setName('_access')->setLabel(___('Access Permissions'));
$form->addText('no_access_url', array('class' => 'el-wide'))->setLabel(___("No Access URL\ncustomer without required access will be redirected to this url\nleave empty if you want to redirect to default 'No access' page"));
$this->addCategoryToForm($form);
$fs = $form->addAdvFieldset('meta', array('id' => 'meta'))->setLabel(___('Meta Data'));
$fs->addText('meta_title', array('class' => 'el-wide'))->setLabel(___('Title'));
$fs->addText('meta_keywords', array('class' => 'el-wide'))->setLabel(___('Keywords'));
$fs->addText('meta_description', array('class' => 'el-wide'))->setLabel(___('Description'));
return $form;
}
示例2: createForm
function createForm()
{
$form = new Am_Form_Admin();
$form->addText('title', array('size' => 80))->setLabel('Title')->addRule('required', 'This field is required');
$form->addText('desc', array('size' => 80))->setLabel(___('Description'));
$form->addAdvCheckbox('hide')->setLabel(___("Hide\n" . "do not display this item link in members area"));
$form->addAdvCheckbox('use_layout')->setLabel("Dislpay inside layout\nwhen displaying to customer will\nthe header/footer from current theme be displayed?");
$form->addHtmlEditor('html');
//->setLabel('HTML code')->addRule('required', 'This field is required');
$form->addElement(new Am_Form_Element_ResourceAccess())->setName('_access')->setLabel(___('Access Permissions'));
return $form;
}