/**
  * 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 EmployeeTermination the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = EmployeeTermination::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #2
0
								<button type="button" class="btn btn-default" id="choose_employee">Choose</button>
							</span>
						</div>
						<?php 
echo CHtml::error($model, 'employee_id');
?>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($model, 'terminate_type', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">
						<?php 
echo CHtml::activeDropDownList($model, 'terminate_type', EmployeeTermination::model()->getTypes(), array('prompt' => '', 'class' => 'validate[required] form-control select'));
?>
						<?php 
echo CHtml::error($model, 'terminate_type');
?>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($model, 'terminate_date', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">
						<div class="input-group">
							<span class="input-group-addon"><span class="fa fa-calendar"></span></span>
							<?php