Example #1
0
File: _form.php Project: reubsc/sds
echo $form->labelEx($model, 'languageID');
?>
		<?php 
echo CHtml::activeDropDownList($model, 'languageID', CHtml::listData(Languages::model()->findAll(), 'languageID', 'languageName'), array('empty' => 'Select Language'));
?>
		<?php 
echo $form->error($model, 'languageID');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'personnelTypeID');
?>
		<?php 
echo CHtml::activeDropDownList($model, 'personnelTypeID', CHtml::listData(PersonnelTypes::model()->findAll(), 'personnelTypeID', 'personnelTypeName'), array('empty' => 'Select Personnel Type'));
?>
		<?php 
echo $form->error($model, 'personnelTypeID');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'salutationID');
?>
		<?php 
echo CHtml::activeDropDownList($model, 'salutationID', CHtml::listData(Salutations::model()->findAll(), 'salutationID', 'salutationName'), array('empty' => 'Select Salutation'));
?>
		<?php 
echo $form->error($model, 'salutationID');
Example #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 PersonnelTypes the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = PersonnelTypes::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }