예제 #1
0
 public function getForm()
 {
     Yii::app()->controller->widget('ext.tinymce.TinymceWidget');
     return new CMSForm(array('id' => __CLASS__, 'showErrorSummary' => true, 'attributes' => array('class' => 'form-horizontal'), 'elements' => array('name' => array('type' => 'text', 'id' => 'title'), 'seo_alias' => array('type' => 'text', 'id' => 'alias', 'visible' => !Yii::app()->settings->get('core', 'translate_object_url')), 'parent_id' => array('type' => 'dropdownlist', 'items' => Html::listData(CategoriesModel::model()->parent()->findAll(), 'id', 'name'), 'empty' => '— Выбать —'), 'module' => array('type' => 'dropdownlist', 'items' => CMS::getModules()), 'text' => array('type' => 'textarea', 'class' => 'editor'), 'date_update' => array('type' => 'text', 'value' => date('Y-m-d H:i:s'))), 'buttons' => array('submit' => array('type' => 'submit', 'class' => 'btn btn-success', 'label' => Yii::t('app', 'SAVE')))), $this);
 }
예제 #2
0
 public function getForm()
 {
     Yii::app()->controller->widget('ext.tinymce.TinymceWidget');
     return new CMSForm(array('showErrorSummary' => true, 'attributes' => array('class' => 'form-horizontal', 'id' => __CLASS__), 'elements' => array('name' => array('type' => 'text'), 'content' => array('type' => 'textarea', 'class' => 'editor'), 'widget' => array('type' => 'dropdownlist', 'items' => Yii::app()->widgets->getData(), 'empty' => Yii::t('app', 'EMPTY_DROPDOWNLIST', 1), 'hint' => $this->t('HINT_WIDGET')), '<div id="payment_configuration"></div>', 'modules' => array('type' => 'checkboxlist', 'items' => CMS::getModules()), 'access' => array('type' => 'dropdownlist', 'items' => Yii::app()->access->dataList(), 'empty' => Yii::t('app', 'EMPTY_DROPDOWNLIST', 1)), 'position' => array('type' => 'dropdownlist', 'items' => $this->allPositions, 'empty' => Yii::t('app', 'EMPTY_DROPDOWNLIST', 1)), 'expire' => array('type' => 'text'), 'action' => array('type' => 'dropdownlist', 'empty' => Yii::t('app', 'EMPTY_DROPDOWNLIST', 1), 'items' => array('update' => Yii::t('app', 'OFF', 1), 'delete' => Yii::t('app', 'DELETE')), 'hint' => $this->t('HINT_ACTION'))), 'buttons' => array('submit' => array('type' => 'submit', 'class' => 'btn btn-success', 'label' => Yii::t('app', 'SAVE')))), $this);
 }