/**
  * 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 the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = OmmuZoneCountry::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, Yii::t('phrase', 'The requested page does not exist.'));
     }
     return $model;
 }
Пример #2
0
		<div id="ajax-message">
			<?php 
echo $form->errorSummary($model);
?>
		</div>
		<?php 
//begin.Messages
?>

		<div class="clearfix">
			<?php 
echo $form->labelEx($model, 'country_id');
?>
			<div class="desc">
				<?php 
echo $form->dropDownList($model, 'country_id', OmmuZoneCountry::getCountry());
?>
				<?php 
echo $form->error($model, 'country_id');
?>
				<?php 
/*<div class="small-px silent"></div>*/
?>
			</div>
		</div>

		<div class="clearfix">
			<?php 
echo $form->labelEx($model, 'province');
?>
			<div class="desc">