<?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'content-category-form', 'enableAjaxValidation' => false)); ?> <p class="help-block">Fields with <span class="required">*</span> are required.</p> <?php echo $form->errorSummary($model); //echo $form->dropDownListControlGroup($model, 'parent_id', CHtml::listData(ContentCategory::model()->findAll(array('condition' => 'parent_id=0 AND published=1', "order" => "title")), 'id', 'title'), array('empty' => '--please select--', 'class' => 'span5')); if ($model->isNewRecord) { echo ContentCategory::get_category_new('ContentCategory', 'parent_id'); } else { echo ContentCategory::get_category_update('ContentCategory', 'parent_id', $model->parent_id); } echo $form->textFieldControlGroup($model, 'title', array('class' => 'span5', 'maxlength' => 255)); echo $form->labelEx($model, 'description'); $this->widget('application.extensions.xheditor.JXHEditor', array('model' => $model, 'attribute' => 'description', 'htmlOptions' => array('class' => 'xheditor', 'style' => 'width: 100%; height: 150px;'))); echo $form->dropDownListControlGroup($model, 'published', array('1' => 'Yes', '0' => 'No')); ?> <div class="form-actions"> <?php echo TbHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array('color' => TbHtml::BUTTON_COLOR_PRIMARY)); ?> <?php echo TbHtml::resetButton('Reset', array('color' => TbHtml::BUTTON_COLOR_INFO)); ?> </div> <?php $this->endWidget();
<?php $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'content-form', 'enableAjaxValidation' => false, 'htmlOptions' => array('enctype' => 'multipart/form-data'))); Yii::app()->clientScript->registerScript('search', "\n \$('#Content_images').ace_file_input({\n no_file: 'No Image ...',\n btn_choose: 'Choose',\n btn_change: 'Change',\n droppable: false,\n onchange: null,\n thumbnail: false //| true | large\n //whitelist:'gif|png|jpg|jpeg'\n //blacklist:'exe|php'\n //onchange:''\n //\n });\n"); ?> <p class="help-block">Fields with <span class="required">*</span> are required.</p> <?php echo $form->errorSummary($model); ?> <div class="row-fluid"> <div class="span12"> <?php if ($model->isNewRecord) { echo ContentCategory::get_category_new('Content', 'catid'); } else { echo ContentCategory::get_category_update('Content', 'catid', $model->catid); } ?> </div> </div> <?php echo $form->textFieldControlGroup($model, 'title', array('class' => 'span12', 'maxlength' => 255)); ?> <div class="control-group"> <label for="form-field-1" class="control-label"><?php echo $form->labelEx($model, 'introtext'); ?> </label> <div class="controls"> <?php $this->widget('application.extensions.yii-ckeditor.CKEditorWidget', array('model' => $model, 'attribute' => 'introtext', 'config' => array('language' => 'en')));