thanks to both of you. I have been trying to keep the plugin without changes and your solution worked.
Actually was very easy. I just override the sfGuardUserAdminForm.class.php and modified the validation of the 'permissions_list' field. It doesn't work before because I was trying to change the validation in sfGuardUserForm instead of sfGuardUserAdminForm class. So, if sfGuardUserForm is automatically created in /lib/form/doctrine/ sfDoctrineGuardPlugin when it was installed, what kind of changes to the form could be made in this class? Thank you very much for your help. José A. San Gil http://jsangil.blogspot.com On Jan 14, 2:38 pm, ozgur ince <oin...@gmail.com> wrote: > Javier is right sorry for misinformation, > > copy plugins\sfDoctrineGuardPlugin\modules\sfGuardUser\config\generator.yml > to \your_project\apps\your_app\modules\sfGuardUser\config\generator.yml > > change form class in this generator.yml (i.e sfGuardMyUserAdminForm) > > create the new form class in \your_project\lib\form\doctrine > > class sfGuardMyUserAdminForm extends sfGuardUserAdminForm > { > public function configure() > { > $this->validatorSchema['permissions_list']->setOption('required', True); > } > > } > > i personally do changes in plugin files but dont follow me :) > > On Thu, Jan 14, 2010 at 1:49 PM, Javier Garcia <tirengar...@gmail.com> wrote: > > On 01/14/2010 06:30 AM, ozgur ince wrote: > > >> you should do your changes in > >> plugins\sfDoctrineGuardPlugin\lib\form\doctrine\sfGuardUserAdminForm.class > > >> or > > >> change the form class in > >> plugins\sfDoctrineGuardPlugin\modules\sfGuardUser\config\generator.yml > > > Hi, > > > you should never modify the code or the structure inside of the plugins (as > > ozgur ince says). You should extended it as you are trying. > > > I dont know if it will work, but żhave you try to modify the widgetSchema > > instead of validatorSchema (in the same function configure() )? > > > Javi > > > -- > > You received this message because you are subscribed to the Google Groups > > "symfony users" group. > > To post to this group, send email to symfony-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/symfony-users?hl=en. > >
-- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.