예제 #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 GolonganObat the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = GolonganObat::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
예제 #2
0
파일: _form.php 프로젝트: bangphe/klinik
		<div class="col-md-4">
			<?php 
echo $form->textArea($item, 'NAMA_ITEM', array('maxlength' => 100, 'class' => 'form-control input-large'));
?>
			<?php 
echo $form->error($item, 'NAMA_ITEM');
?>
		</div>
	</div>
	<div class="form-group" id="golongan">
		<?php 
echo $form->labelEx($item, 'ID_GOLONGAN_OBAT', array('class' => 'control-label col-md-3'));
?>
		<div class="col-md-4">
			<?php 
echo $form->dropDownList($item, 'ID_GOLONGAN_OBAT', GolonganObat::listAll(), array('class' => 'bs-select form-control input-large form-select', 'prompt' => '- Pilih Golongan Obat -'));
?>
			<?php 
echo $form->error($item, 'ID_GOLONGAN_OBAT');
?>
		</div>
	</div>

	<div class="form-group" id="satuan">
		<?php 
echo $form->labelEx($item, 'SATUAN', array('class' => 'control-label col-md-3'));
?>
		<div class="col-md-4">
			<?php 
echo $form->textField($item, 'SATUAN', array('class' => 'form-control input-large', 'placeholder' => 'Tablet/Kapsul/Alpha'));
?>