<?php
/* @var $this UserController */
/* @var $model User */
/* @var $form CActiveForm */
?>

<div class="form-normal form-horizontal clearfix">
	<div class="col-md-12">

		<?php $form = $this->beginWidget('CActiveForm', array(
			'id' => 'user-form',
			'enableAjaxValidation' => false,
			'enableClientValidation' => false,
			'clientOptions' => array(
				'validateOnSubmit' => true,
			),
			'errorMessageCssClass' => 'label label-danger',
			'htmlOptions' => array('enctype' => 'multipart/form-data', 'autocomplete' => 'off'),
		)); ?>

		<?php echo $form->errorSummary($model, null, null, array('class' => 'alert alert-warning')); ?>


		<div class="form-group">
			<div class="col-md-10">
				<?php echo $form->error($model, 'image'); ?>
				<?php echo $form->fileField($model, 'image', array('size' => 50, 'maxlength' => 50, 'class' => 'btn btn-success btn-block')); ?>
			</div>
			<div class="col-md-2">
				<?php echo CHtml::submitButton($model->isNewRecord ? 'Submit' : 'Upload', array('class' => 'btn btn-info btn-flat pull-right btn-block')); ?>
			</div>
		</div>


	</div>

</div><!-- form -->

<?php $this->endWidget(); ?>