<?php $form=$this->beginWidget('booster.widgets.TbActiveForm',array(
	'id'=>'hrd-drequest-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,'id_hrd_t_request_duty_letter',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5')))); ?>

	<?php 
		//echo $form->textFieldGroup($model,'nama_petugas',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>100)))); 
		echo $form->label($model, 'nama_petugas');
        //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'=>'nama_petugas',
                'name' => 'demo-typeahead',
                'datasets' => array(
                    'source' => $list,
                ),
                'options' => array(
                    'hint' => true,
                    'highlight' => true,
                    'minLength' => 1
                ),
            )
        );
        echo $form->error($model, 'nama_petugas');
	?>

	<?php 
		//echo $form->textFieldGroup($model,'nama_pengemban_tugas',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5','maxlength'=>100)))); 
		echo $form->label($model, 'nama_pengemban_tugas');
        //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'=>'nama_pengemban_tugas',
                'name' => 'demo-typeahead',
                'datasets' => array(
                    'source' => $list,
                ),
                'options' => array(
                    'hint' => true,
                    'highlight' => true,
                    'minLength' => 1
                ),
            )
        );
        echo $form->error($model, 'nama_pengemban_tugas');
	?>

	<?php echo $form->textAreaGroup($model,'keterangan', 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'=>15)))); ?>

	<?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'=>200)))); ?>

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

	<?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'=>200)))); ?>

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

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