Exemple #1
0
echo $form->labelEx($model, 'name');
?>
		<?php 
echo $form->textField($model, 'name', array('size' => 60, 'maxlength' => 64));
?>
		<?php 
echo $form->error($model, 'name');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'type');
?>
		<?php 
echo $form->dropDownList($model, 'type', AuthItems::getTipos(), array('empty' => ''));
?>
		<?php 
echo $form->error($model, 'type');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'description');
?>
		<?php 
echo $form->textArea($model, 'description', array('rows' => 6, 'cols' => 50));
?>
		<?php 
echo $form->error($model, 'description');
 /**
  * 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 the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = AuthItems::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }