예제 #1
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 PayrollCities the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = PayrollCities::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
예제 #2
0
?>
<div class="row">
    <div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">										
				<div class="errorMessage" id="alert_error_msg"></div>
			</div>

			<div class="panel-body">
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($salary, 'city_area_id', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">
						<?php 
echo CHtml::activeDropDownList($salary, 'city_area_id', CHtml::listData(PayrollCities::model()->findAll(), 'id', 'name'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'data-live-search' => 'true', 'class' => 'validate[required] form-control select', 'id' => 'field_city_area_id'));
?>
						<?php 
echo CHtml::error($salary, 'city_area_id');
?>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($salary, 'department_id', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">
						<?php 
echo CHtml::activeDropDownList($salary, 'department_id', CHtml::listData(MastersDepartments::model()->byOrder()->findAll(), 'id', 'name'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'data-live-search' => 'true', 'class' => 'validate[required] form-control select', 'id' => 'field_department_id', 'ajax' => array('type' => 'GET', 'url' => array('departments/actionDynamicSections'), 'data' => array('id' => 'js:this.value'), 'success' => 'function(data){
																updateDropdown(this, $("#MastersEmployees_section_id"), data);
예제 #3
0
				<ul class="panel-controls">
					<li><?php 
echo CHtml::link(at('Generate Salary Standard'), array('generatesalary', 'id' => $model->id), array('class' => 'btn btn-primary'));
?>
</li>
				</ul>
			</div>

			<div class="panel-body">
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($model, 'city_id', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">                                                                                                                                           
						<?php 
echo CHtml::activeDropDownList($model, 'city_id', CHtml::listData(PayrollCities::model()->findAll(), 'id', 'name'), array('data-placeholder' => at('Please select one...'), 'prompt' => '', 'class' => 'validate[required] form-control select'));
?>
						<?php 
echo CHtml::error($model, 'city_id');
?>
					</div>
				</div>
				
				<div class="form-group">
					<?php 
echo CHtml::activeLabelEx($model, 'year', array('class' => $label_class));
?>
					<div class="col-md-6 col-xs-12">                                                                                                                                           
						<?php 
echo CHtml::activeTextField($model, 'year', array('size' => 60, 'maxlength' => 255, 'class' => 'validate[required] form-control'));
?>