示例#1
0
<?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);
?>
<div class="row-fluid">
    <div class="span12">
        <?php 
if ($model->isNewRecord) {
    echo BannerCategory::get_category_new('BannerCategory', 'parent_id');
} else {
    echo BannerCategory::get_category_update('BannerCategory', 'parent_id', $model->parent_id);
}
?>
    </div>
</div>
<?php 
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));
示例#2
0
<?php

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'banner-form', 'enableAjaxValidation' => false, 'htmlOptions' => array('enctype' => 'multipart/form-data')));
?>
<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 BannerCategory::get_category_new('Banner', 'catid');
} else {
    echo BannerCategory::get_category_update('Banner', 'catid', $model->catid);
}
?>
    </div>
</div>
<?php 
echo $form->textFieldControlGroup($model, 'name', array('class' => 'span5', 'maxlength' => 255));
?>
<div class="row-fluid">
    <div class="span5">
        <?php 
echo $form->fileFieldControlGroup($model, 'banner', array('maxlength' => 255, 'class' => 'span12'));
?>
    </div>
</div>
<?php