Ejemplo n.º 1
0
/* @var $model Ban */
/* @var $form CActiveForm */
?>

<div class="wide form">

<?php 
$form = $this->beginWidget('CActiveForm', array('action' => Yii::app()->createUrl($this->route), 'method' => 'get'));
?>
	
	<div class="row">
		<?php 
echo $form->labelEx($model, 'POSISI_BAN');
?>
		<?php 
$data = TbHtml::listData(PosisiBan::model()->findAll(), 'ID_POSISI', 'POSISI');
echo $form->dropDownList($model, 'ID_POSISI', $data, array('empty' => 'Pilih Posisi Ban'));
?>
		<?php 
echo $form->error($model, 'ID_POSISI');
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'NOMOR_SERI');
?>
		<?php 
echo $form->textField($model, 'NOMOR_SERI', array('size' => 20, 'maxlength' => 20));
?>
	</div>
Ejemplo n.º 2
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 PosisiBan the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = PosisiBan::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }