/**
  * 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 = ZoneMaster::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Beispiel #2
0
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'member_address');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'member_zone');
?>
		<?php 
//echo $form->textField($model,'member_zone');
?>
		<?php 
echo $form->dropDownList($model, 'member_zone', CHtml::listData(ZoneMaster::model()->findAll(), 'id', 'zone_name'), array('empty' => '-------Select Zone-------'));
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'member_zone');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'member_birthdate');
?>
		
		<?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'member_birthdate', 'language' => 'en', 'options' => array('dateFormat' => 'yy-mm-dd', 'changeMonth' => 'true', 'changeYear' => 'true', 'duration' => 'fast', 'showAnim' => 'slide'), 'htmlOptions' => array('style' => 'height:18px;
			    padding-left: 4px;width:168px;')));