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
)