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