?> <?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 echo $form->error($model, 'id_satuan_kerja'); ?> </div> <br> <div class="row"> <?php echo $form->labelEx($model, 'lokasi_kerja'); ?> <?php $this->widget('ext.chosen.Chosen', array('name' => 'Pegawai[lokasi_kerja]', 'value' => $model->lokasi_kerja, 'data' => array('' => 'Semua') + CHtml::listData(LokasiKerja::model()->findAll(), 'id_lokasi_kerja', 'lokasi_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 SatuanKerja the loaded model * @throws CHttpException */ public function loadModel($id) { $model = SatuanKerja::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }