/**
  * 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 WUserGroup the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = WUserGroup::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemplo n.º 2
0
<br/>
        <span class="font11"><?php 
echo $form->error($model, 'title');
?>
</span>
    </td>
</tr>

<tr>
    <td valign="top"><?php 
echo $form->labelEx($model, 'group_id');
?>
</td>
    <td valign="">
        <?php 
echo $form->dropDownList($model, 'group_id', CHtml::listData(WUserGroup::model()->findAll("ID NOT IN(3)"), 'id', 'group_name'), array('prompt' => '--Select Group--', 'class' => 'form-control', 'style' => 'width:180px;margin-bottom:10px;'));
?>
    </td>
</tr>
<tr>
    <td valign="top"><?php 
echo $form->labelEx($model, 'description');
?>
</td>
    <td valign="">
        <?php 
echo $form->textArea($model, 'description', array('size' => 60, 'maxlength' => 500, 'class' => 'form-control', 'style' => 'height:80px;margin-bottom:17px;'));
?>
        <?php 
echo $form->error($model, 'description');
?>