public static function getPlaceOfDelivery() { $placeOfDelivery = ZHtml::enumItem(ChildHealth::model(), 'place_of_delivery'); $placeOfDelivery[''] = ''; asort($placeOfDelivery); return $placeOfDelivery; }
/** * 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 ChildHealth the loaded model * @throws CHttpException */ public function loadModel($id) { $model = ChildHealth::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<script language="javascript"> document.getElementById('menu_health').className = 'active'; document.getElementById('menu_health_patients').className = 'active'; </script> <?php /* @var $this PatientController */ /* @var $model Patient */ $this->breadcrumbs = array('Health', 'Patients' => array('index'), 'View Patient'); if (!ChildHealth::model()->findByAttributes(array('patient_id' => $model->id))) { echo CHtml::button("Create Child Health Record", array('submit' => array('childhealth/create', 'id' => $model->id), 'class' => 'btn btn-sm btn-primary')); echo "<br/>"; echo "<br/>"; } if (!FamilyPlanningService::model()->findByAttributes(array('patient_id' => $model->id))) { echo CHtml::button("Create Family Planning Service Record", array('submit' => array('familyplanningservice/create', 'id' => $model->id), 'class' => 'btn btn-sm btn-primary')); echo "<br/>"; echo "<br/>"; } echo CHtml::button("Create Maternal Health Record", array('submit' => array('maternalhealth/create', 'id' => $model->id), 'class' => 'btn btn-sm btn-primary')); echo "<br/>"; echo "<br/>"; echo CHtml::button("Create NTP Laboratory Request", array('submit' => array('ntplaboratoryrequest/create', 'id' => $model->id), 'class' => 'btn btn-sm btn-primary')); echo "<br/>"; echo "<br/>"; echo CHtml::button("Create NTP Treatment Card", array('submit' => array('ntptreatmentcard/create', 'id' => $model->id), 'class' => 'btn btn-sm btn-primary')); echo "<br/>"; echo "<br/>"; ?> <div class="panel panel-primary"> <div class="panel-heading">
echo $form->label($model, 'ufc_no', array('class' => 'control-label col-sm-4')); ?> <div class="col-sm-8"> <?php echo $form->textField($model, 'ufc_no', array('class' => 'form-control')); ?> </div> </div> <div class="form-group"> <?php echo $form->label($model, 'place_of_delivery', array('class' => 'control-label col-sm-4')); ?> <div class="col-sm-8"> <?php echo $form->dropDownList($model, 'place_of_delivery', ChildHealth::getPlaceOfDelivery(), array('class' => 'form-control')); ?> </div> </div> <div class="form-group"> <?php echo $form->label($model, 'mothers_name', array('class' => 'control-label col-sm-4')); ?> <div class="col-sm-8"> <?php echo $form->textField($model, 'mothers_name', array('class' => 'form-control')); ?> </div> </div>