Beispiel #1
0
        </div>
		<?php 
echo $form->error($model, 'audit_trails_access_level');
?>
	</div>

	<div class="row form-group">
        <div class="col-md-3 control-label">
		<?php 
echo $form->labelEx($model, 'grouping_access_level');
?>
        </div>
        <div class="col-md-4">
		<?php 
//echo $form->textField($model,'grouping_access_level');
echo $form->dropDownList($model, 'grouping_access_level', CHtml::listData(AccessLevels::model()->findAll(array('select' => 'id, access_level', 'order' => 'access_level')), 'id', 'access_level'), array('empty' => '- Select -', 'class' => 'form-control'));
?>
        </div>
		<?php 
echo $form->error($model, 'grouping_access_level');
?>
	</div>

	<div class="row form-group">
        <div class="col-md-3 control-label"></div>
        <div class="col-md-4">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', ['class' => "btn btn-primary form-control"]);
?>
        </div>
	</div>
 /**
  * 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 AccessLevels the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = AccessLevels::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }