Hey there, they way you're doing it is definitely not the way to go. Please take a look at the admin generated interface of sfDoctrineGuardPlugin and the forms it comes with. There's already something like this is the plugin's form classes (I think it's the sfGuardAdminForm.class.php) because this needs to be handled with post validators and such.
Regards, Daniel On 22.02.2010, at 09:55, Christian Hammers wrote: > Hello > > How can I configure the admin generator to display an additional "retype > password" > field and validate it with the already existing password field that's > populated > with the database content? The retype password should be discarded afterwards > and > so that the admin generator only stores the password if it has changed. > > I known that showing the sha1 hash in the web interface is not as clean as > possible > but I could live with that. It's just for the admins after all :) > > What I managed so far is displaying the additional field using a > _retype_password.php > template and the following generator.yml: > > generator: > class: sfDoctrineGenerator > param: > model_class: ManageUsers > theme: admin > non_verbose_templates: true > with_show: false > singular: ~ > plural: ~ > route_prefix: manage_users > with_doctrine_route: true > actions_base_class: sfActions > > config: > actions: ~ > > fields: > password: > sfStringValidator: > min: 6 > min_error: password must be at least 6 characters > > new_password: > name: Erneut Password > label_for: retype_password > > list: ~ > filter: ~ > form: ~ > > edit: > display: > "User Details": [username, password, _retype_password, comment, > host, expire, type] > > new: ~ > bye, > > -christian- > > -- > You received this message because you are subscribed to the Google Groups > "symfony users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
