Commits

christiansalazar committed 00a19d5

minor adjustments

  • Participants
  • Parent commits 735e716

Comments (0)

Files changed (3)

protected/controllers/ExampleController.php

 		it will use TblUser as the target user model for this form.
 	*/
 	public function actionEYuiForm(){
-	
-		// TblUser will provide extra validation for your form
-		// in order to do that, it must implements: EYuiFormIValidator
-		//
 		$user = TblUser::model()->findByPk(1);
-
-		/*
-			please note here:
-			
-			If you decide not use EYuiFormDb then use:
-				$this->render('eyuiform',array('model'=>YourClass::model()));
-			but in YourClass.php you must implement:
-				EYuiFormIStorage.php
-				and
-				EYuiFormIValidator.php
-			this two interfaces ensure YourClass has the appropiated required methods
-			to work togheter with EYuiForm.
-		*/
-		$this->render('eyuiform'
-			,array('user'=>$user,'validationModel'=>EYuiFormDb::newModel($user)));
+		$this->render('eyuiform',array('user'=>$user));
 	}
 	public function actionEYuiForm2(){
-	
-		// TblUser will provide extra validation for your form
-		// in order to do that, it must implements: EYuiFormIValidator
-		//
 		$user = TblUser::model()->findByPk(1);
-
-		/*
-			please note here:
-			
-			If you decide not use EYuiFormDb then use:
-				$this->render('eyuiform',array('model'=>YourClass::model()));
-			but in YourClass.php you must implement:
-				EYuiFormIStorage.php
-				and
-				EYuiFormIValidator.php
-			this two interfaces ensure YourClass has the appropiated required methods
-			to work togheter with EYuiForm.
-		*/
-		$this->render('eyuiform2'
-			,array('user'=>$user,'validationModel'=>EYuiFormDb::newModel($user)));
+		$this->render('eyuiform2',array('user'=>$user));
 	}
 	public function actionEYuiFormEditor(){
 		$this->render('eyuiformeditor');

protected/views/example/eyuiform.php

 	$this->widget('ext.EYui.EYuiForm',array(
 		'id'=>'form1',
 		'label'=>'A Big Form',
-		'model'=>$validationModel,
+		'model'=>EYuiFormDb::newModel($user),
 		'showErrorResume'=>false,
 		//'themeUrl'=>'themes',
 		//'theme'=>'redmond',

protected/views/example/eyuiform2.php

 	$this->widget('ext.eyui.EYuiForm',array(
 		'id'=>'form1',	// this is the 'form1'
 		'label'=>'A Big Form',
-		'model'=>$validationModel, // provides user values for this field and specific validation.
+		'model'=>EYuiFormDb::newModel($user),
 		'showErrorResume'=>false,
 		'jQueryUiEnabled'=>true,
 		'jQueryControl'=>'tabs', // tabs or accordion