<?php $form=$this->beginWidget('booster.widgets.TbActiveForm',array(
	'id'=>'hrd-trequest-duty-letter-form',
	'enableAjaxValidation'=>true,
)); ?>

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

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

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

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

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

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

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

	<?php echo $form->datePickerGroup($model,'depart_date',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->datePickerGroup($model,'return_date',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->datePickerGroup($model,'starting_date',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->datePickerGroup($model,'finishing_date',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->textFieldGroup($model,'status_id',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5')))); ?>

	<?php //echo $form->datePickerGroup($model,'request_date',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->datePickerGroup($model,'response_date',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->textAreaGroup($model,'rejection_reason', array('widgetOptions'=>array('htmlOptions'=>array('rows'=>6, 'cols'=>50, 'class'=>'span8')))); ?>

	<?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(); ?>
