Exemplo n.º 1
0
							<?php 
echo CHtml::activeRadioButtonList($model, 'gender', ReferenceEmployeeStatuses::model()->getGender(), array('class' => 'validate[required] form-control iradio', 'separator' => ' &nbsp; &nbsp; &nbsp; &nbsp; '));
?>
							<?php 
echo CHtml::error($model, 'gender');
?>
						</div>
					</div>

					<div class="form-group">
						<?php 
echo CHtml::activeLabelEx($model, 'religion_id', array('class' => $label_class));
?>
						<div class="col-md-6 col-xs-12">
							<?php 
echo CHtml::activeDropDownList($model, 'religion_id', CHtml::listData(ReferenceReligions::model()->findAll(), 'id', 'name'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'class' => 'validate[required] form-control select'));
?>
							<?php 
echo CHtml::error($model, 'religion_id');
?>
						</div>
					</div>
				</div>
				
				<div class="col-md-6">
					<div class="form-group">
						<?php 
echo CHtml::activeLabelEx($model, 'ethnic', array('class' => $label_class));
?>
						<div class="col-md-6 col-xs-12">
							<?php 
 /**
  * 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 ReferenceReligions the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = ReferenceReligions::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }