>
> Also on Sign Up form I got a message 'too short' below the Password field
> - in the book link there is not correspondent function to change it.
That's coming from the default CRYPT validator. Try:
db.auth_user.password.requires[-1].error_message = 'Your custom error
message'
This assume
>
> This is not working (it remains E-mail):
> auth.messages.label_email = 'Email'
>
Are you using the default auth.define_tables() to create you Auth models?
You may need to show some code.
>
> Remember me (for 30 days works) - but there is a space above it up to
> password - how to rem
There are settings for almost everything. Sometimes the book doesn't
explain every single one though. The best way to figure out what's going on
is to open the "gluon/tools.py" file, and find the Auth class. This class
will have all the settings listed with their default values at the top of
th
Also on Sign Up form I got a message 'too short' below the Password field -
in the book link there is not correspondent function to change it.
Additionally, tried to change
auth.messages.invalid_email = 'Please enter a valid email address'
But it still shows 'Invalid email'
This is working:
auth.settings.formstyle ='divs'
This is not working (it remains E-mail):
auth.messages.label_email = 'Email'
Remember me (for 30 days works) - but there is a space above it up to
password - how to remove it?
There should be settings for all that stuff
here: http://web2py.com/books/default/chapter/29/9#Settings-and-messages --
mostly in auth.messages.
Anthony
On Monday, January 23, 2012 7:39:45 PM UTC-5, thstart wrote:
>
> It worked. Now I want to change *formstyle* and default labels:
> 1) E-mail
It worked. Now I want to change *formstyle* and default labels:
1) E-mail to Email
2) The message in red below Email: Invalid email to Please enter a valid
email address.
3) The message in red below password: too short to Please enter a valid
password.
too short is actually misleading because I
Thank you Anthony, will try it!
auth.messages.label_remember_me = CAT('Remember me', BR(), '(for 30 days)')
or
auth.messages.label_remember_me = XML('Remember me(for 30 days)')
should do it.
If you need special CSS styling, you could put the label inside a span with
a specific class.
Anthony
On Monday, January 23, 2012 5:5
Actually I need just to change Remember me (for 30 days)"
to
"Remember me(for 30 days)"
10 matches
Mail list logo