示例#1
0
?>
				<?php 
$this->widget('ext.chosen.Chosen', array('name' => 'Pegawai[id_jabatan]', 'value' => $model->id_jabatan, 'data' => array('' => 'Semua') + CHtml::listData(Jabatan::model()->findAll(), 'id_jabatan', 'nama_jabatan')));
?>
				<?php 
echo $form->error($model, 'id_jabatan');
?>
			</div>
			<br>

			<div class="row">
				<?php 
echo $form->labelEx($model, 'id_unit_kerja');
?>
				<?php 
$this->widget('ext.chosen.Chosen', array('name' => 'Pegawai[id_unit_kerja]', 'value' => $model->id_unit_kerja, 'data' => array('' => 'Semua') + CHtml::listData(UnitKerja::model()->findAll(), 'id_unit_kerja', 'nama_unit_kerja')));
?>
				<?php 
echo $form->error($model, 'id_unit_kerja');
?>
			</div>
			<br>

			<div class="row">
				<?php 
echo $form->labelEx($model, 'id_satuan_kerja');
?>
				<?php 
$this->widget('ext.chosen.Chosen', array('name' => 'Pegawai[id_satuan_kerja]', 'value' => $model->id_satuan_kerja, 'data' => array('' => 'Semua') + CHtml::listData(SatuanKerja::model()->findAll(), 'id_satuan_kerja', 'nama_satuan_kerja')));
?>
				<?php 
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return UnitKerja the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = UnitKerja::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }