<?php $form=$this->beginWidget('booster.widgets.TbActiveForm',array(
	'id'=>'hrd-mpegawai-form',
	'enableAjaxValidation'=>false,
)); ?>

<p class="help-block">Fields with <span class="required">*</span> are required.</p>

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

	<?php echo $form->textFieldGroup($model,'nip',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5')))); ?>

	<?php echo $form->textFieldGroup($model,'nama',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>200)))); ?>

	<?php echo $form->textFieldGroup($model,'alias',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>15)))); ?>

	<?php echo $form->dropDownListGroup($model,'jenis_kelamin', array('widgetOptions'=>array('data'=>array("Laki-laki"=>"Laki-laki","Perempuan"=>"Perempuan",), 'htmlOptions'=>array('class'=>'input-large')))); ?>

	<?php echo $form->textFieldGroup($model,'tempat_lahir',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>100)))); ?>

	<?php echo $form->datePickerGroup($model,'t_lahir',array('widgetOptions'=>array('options'=>array(),'htmlOptions'=>array('class'=>'span5')), 'prepend'=>'<i class="glyphicon glyphicon-calendar"></i>', 'append'=>'Click on Month/Year to select a different Month/Year.')); ?>

	<?php echo $form->dropDownListGroup($model,'status_kawin', array('widgetOptions'=>array('data'=>array("TK"=>"TK","K-0"=>"K-0","K-1"=>"K-1","K-2"=>"K-2","K-3"=>"K-3","K-4"=>"K-4","K-5"=>"K-5","K-6"=>"K-6",), 'htmlOptions'=>array('class'=>'input-large')))); ?>

	<?php echo $form->datePickerGroup($model,'d_awal_kerja',array('widgetOptions'=>array('options'=>array(),'htmlOptions'=>array('class'=>'span5')), 'prepend'=>'<i class="glyphicon glyphicon-calendar"></i>', 'append'=>'Click on Month/Year to select a different Month/Year.')); ?>

	<?php echo $form->dropDownListGroup($model,'status_now', array('widgetOptions'=>array('data'=>array("Aktif"=>"Aktif","TSDP"=>"TSDP","Keluar"=>"Keluar","Meninggal"=>"Meninggal",), 'htmlOptions'=>array('class'=>'input-large')))); ?>

	<?php echo $form->textFieldGroup($model,'grup_awal',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>100)))); ?>

	<?php echo $form->textFieldGroup($model,'grup_now',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>100)))); ?>

	<?php echo $form->dropDownListGroup($model,'unit_kerja', array('widgetOptions'=>array('data'=>array("IT Del"=>"IT Del","Yacab"=>"Yacab","Yapus"=>"Yapus",), 'htmlOptions'=>array('class'=>'input-large')))); ?>

	<?php echo $form->dropDownListGroup($model,'ukuran_baju', array('widgetOptions'=>array('data'=>array("S"=>"S","M"=>"M","L"=>"L","XL"=>"XL","XXL"=>"XXL",), 'htmlOptions'=>array('class'=>'input-large')))); ?>

	<?php echo $form->dropDownListGroup($model,'status_kepeg', array('widgetOptions'=>array('data'=>array("Tetap"=>"Tetap","Kontrak"=>"Kontrak","Harian"=>"Harian",), 'htmlOptions'=>array('class'=>'input-large')))); ?>

	<?php
        echo $form->label($model, 'user_id');
	    //echo $form->textFieldGroup($model,'user_id',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5'))));
        $data_user = User::model()->findAll();
        $list = array();
        $index = 0;
        foreach($data_user as $item){
            $list[$index] = $item->username;
            $index++;
        }
        $this->widget(
            'booster.widgets.TbTypeahead',
            array(
                'model'=>$model,
                'attribute'=>'user_id',
                'name' => 'demo-typeahead',
                'datasets' => array(
                    'source' => $list,
                ),
                'options' => array(
                    'hint' => true,
                    'highlight' => true,
                    'minLength' => 1
                ),
            )
        );
    ?>

	<?php echo $form->dropDownListGroup($model,'pendidikan_awal', array('widgetOptions'=>array('data'=>array("SMP"=>"SMP","SMA"=>"SMA","SMK"=>"SMK","D1"=>"D1","D2"=>"D2","D3"=>"D3","S1"=>"S1","S2"=>"S2","S3"=>"S3",), 'htmlOptions'=>array('class'=>'input-large')))); ?>

	<?php echo $form->dropDownListGroup($model,'pendidikan_now', array('widgetOptions'=>array('data'=>array("SMP"=>"SMP","SMA"=>"SMA","SMK"=>"SMK","D1"=>"D1","D2"=>"D2","D3"=>"D3","S1"=>"S1","S2"=>"S2","S3"=>"S3",), 'htmlOptions'=>array('class'=>'input-large')))); ?>

	<?php echo $form->textFieldGroup($model,'golongan_awal',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>45)))); ?>

	<?php echo $form->textFieldGroup($model,'golongan_now',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>45)))); ?>

	<?php echo $form->textFieldGroup($model,'prefix_gelar',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>45)))); ?>

	<?php echo $form->textFieldGroup($model,'suffix_gelar',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>45)))); ?>

	<?php //echo $form->textFieldGroup($model,'created_by',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>200)))); ?>

	<?php //echo $form->textFieldGroup($model,'created_date',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5')))); ?>

	<?php //echo $form->textFieldGroup($model,'created_ip',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>15)))); ?>

	<?php //echo $form->textFieldGroup($model,'updated_by',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>200)))); ?>

	<?php //echo $form->textFieldGroup($model,'updated_date',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5')))); ?>

	<?php //echo $form->textFieldGroup($model,'updated_ip',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>15)))); ?>

<div class="form-actions">
	<?php $this->widget('booster.widgets.TbButton', array(
			'buttonType'=>'submit',
			'context'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
</div>

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