Exemple #1
0
		<div class="col-sm-10">
		<?php 
echo $form->textField($model, 'position', array('class' => 'form-control', 'maxlength' => 255, 'placeholder' => 'Позиция'));
?>
		<?php 
echo $form->error($model, 'position');
?>
		</div>
	</div>
	<div class="form-group">
                <?php 
echo $form->labelEx($model, 'status', array('class' => 'col-sm-2 control-label'));
?>
                <div class="col-sm-10">
                <?php 
echo $form->dropDownList($model, 'status', Banners::getStatusNames(), array('encode' => false, 'class' => 'form-control', 'options' => array(Banners::STATUS_ACTIVE => array('selected' => 'selected'))));
?>
                </div>
        </div>

     <div class="form-group">
	   <?php 
CHtml::$afterRequiredLabel = ' <span class="text-danger">*</span>';
?>
		<?php 
echo $form->labelEx($model, 'image', array('class' => 'col-sm-2 control-label'));
?>
		<div class="col-sm-10">
		<?php 
$this->widget('ext.dropzone.EDropzone', array('id' => 'part' . $model->id, 'model' => $model, 'name' => 'image', 'attribute' => 'image', 'formId' => 'banners-form', 'sizeLimit' => $sizeLimit, 'deleteFile' => Yii::app()->createAbsoluteUrl('/admin/banners/deletefile'), 'unlinkFile' => Yii::app()->createAbsoluteUrl('/file/upload/unlink', array('uploadsession' => $this->uploadsession)), 'url' => $this->createAbsoluteUrl('/file/upload/upload', array('inputName' => 'image', 'uploadsession' => $this->uploadsession)), 'options' => array()));
?>