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

<div class="form-horizontal">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>


	<?php echo $form->errorSummary($model); ?>






 <div class="form-group">
   <label class="col-sm-2 control-label">
   USERNAME *
   </label>

   <div class="col-sm-3">
  <?php echo $form->textField($model,'username',array('class'=>'form-control')); ?>
		<?php echo $form->error($model,'username'); ?>
    </div>
 </div>
	



 <div class="form-group">
   <label class="col-sm-2 control-label">
  PASSWORD *
   </label>

   <div class="col-sm-4">
 <?php echo $form->passwordField($model,'password',array('class'=>'form-control')); ?>
		<?php echo $form->error($model,'password'); ?>
    </div>
 </div>


 <div class="form-group">
   <label class="col-sm-2 control-label">
 ULANGI PASSWORD *
   </label>

   <div class="col-sm-4">
		<?php echo $form->passwordField($model,'password_repeat',array('class'=>'form-control')); ?>
		<?php echo $form->error($model,'password_repeat'); ?>
    </div>
 </div>

  
 <div class="form-group">
   <label class="col-sm-2 control-label">
   LOKET *
   </label>

   <div class="col-sm-2">
    <?php echo $form->dropDownList($model,'loket',CHtml::listData(Loket::model()->findAll(), 'id', 'nama_loket'),array('class'=>'form-control','prompt'=>'------pilih------'));?>
  <?php echo $form->error($model,'loket'); ?>
    </div>
 </div>

<div class="row">
    <label  class="col-md-2 control-label">
    <?php echo $form->labelEx($model,'level'); ?>
  </label>
  <div class="col-md-4">  
    <?php echo $form->dropDownList($model,'level', Yii::app()->user->getUserLevelsList(), array('empty'=>'-- Pilih Level --','class'=>'form-control')); ?>
    <?php echo $form->error($model,'level'); ?>
  </div>
  
</div>


 <div class="form-group">
   <label class="col-sm-2 control-label">
	
   </label>

   <div class="col-sm-6">
	<?php echo CHtml::submitButton($model->isNewRecord ? 'Simpan' : 'Ubah',array('class'=>'btn btn-success btn-sm')); ?>
    </div>
 </div>




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

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