You're right -- there's one setting for both buttons (auth.messages.password_reset_button), but they should probably be separate. For now, you could add some code changing the setting right before the reset form is created:
auth.messages.password_reset_button = 'Reset Password' form = auth.reset_password() return dict(form=form) Anthony On Wednesday, December 7, 2011 10:54:12 PM UTC-5, Constantine Vasil wrote: > > I implemented request_reset_password in a separate > url to have more control on the design. > > The email comes with the link pointing to: > /reset_password. I am clicking on the link and I can change the password > but the button showing on reset_password form is "Request Reset Password" > like the button in /request_reset_password. I believe it should be "Reset > Password". > > The question is how to change the name of the button. If I use form > factory I can define it like this: > form = SQLFORM.factory( > submit_button = 'Submit' > > ) > > But how to change it directly? > > Thank in advance, > --Constantine > > def request_reset_password(): > form=current.app.auth.request_reset_password() > form.custom.submit['_data-theme'] = 'e' > form.custom.submit['_data-ajax'] = 'false' > auth.messages.reset_password = \ > 'Click on the link http://' + > current.request.env.http_host + \ > URL('reset_password') + \ > '/%(key)s to reset your password' > current.app.auth = auth > > return dict( > form=form > ) > > def reset_password(): > form=current.app.auth.reset_password(next=reset_password_next) > form.custom.submit['_data-theme'] = 'e' > form.custom.submit['_data-ajax'] = 'false' > form.custom.submit_button = 'Reset Password' > return dict( > form=form > ) > > > > >