示例#1
0
echo $form->labelEx($model, 'tanggal_selesai_jabatan');
?>
				<?php 
echo $form->dateField($model, 'tanggal_selesai_jabatan', array('size' => 50, 'maxlength' => 50, 'class' => 'input-block-level'));
?>
				<?php 
echo $form->error($model, 'tanggal_selesai_jabatan');
?>
			</div>

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

			<div class="row">
				<?php 
echo $form->labelEx($model, 'tmt_eselon');
?>
				<?php 
echo $form->textField($model, 'tmt_eselon', array('size' => 50, 'maxlength' => 50, 'class' => 'input-block-level'));
?>
				<?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 Eselon the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Eselon::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }