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

	<div class="form-group">
		<?php 
echo $form->labelEx($model, 'ID_SUBPELPEND', array('class' => 'col-md-3 control-label'));
?>
            <div class="col-md-4">
		<?php 
//echo $form->textField($model,'ID_SUBPELPEND');
?>
                <?php 
echo $form->dropDownList($model, 'ID_SUBPELPEND', CHtml::listData(SubunPelpend::model()->findAll(), 'ID_SUBPELPEND', 'SUBPELPEND'), array('class' => 'form-control', 'empty' => '- Pilih Sub Unsur -'));
?>
		<?php 
echo $form->error($model, 'ID_SUBPELPEND');
?>
            </div>
	</div>

	<div class="form-group">
		<?php 
echo $form->labelEx($model, 'KEGIATAN_PELPEND', array('class' => 'col-md-3 control-label'));
?>
            <div class="col-md-4">
		<?php 
echo $form->textArea($model, 'KEGIATAN_PELPEND', array('class' => 'form-control'));
?>