コード例 #1
0
 /**
  * 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 Penghargaan the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Penghargaan::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
コード例 #2
0
ファイル: _form.php プロジェクト: eoctav/simpeg-yii
echo $form->errorSummary($model);
?>

	<?php 
$model->id_pegawai = $id;
?>
	<?php 
echo $form->hiddenField($model, 'id_pegawai', array('class' => 'input-block-level'));
?>

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

	<div class="row">
		<?php 
echo $form->labelEx($model, 'uraian');
?>
		<?php 
echo $form->textArea($model, 'uraian', array('rows' => 6, 'cols' => 50, 'class' => 'input-block-level'));
?>
		<?php