[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-24 Thread Ross Peoples
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 the

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-24 Thread Anthony
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 remove

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-24 Thread Anthony
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 assumes

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
Actually I need just to change Remember me (for 30 days) to Remember mebr(for 30 days)

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread Anthony
auth.messages.label_remember_me = CAT('Remember me', BR(), '(for 30 days)') or auth.messages.label_remember_me = XML('Remember mebr(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

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
Thank you Anthony, will try it!

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
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

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread Anthony
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 to

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
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?

[web2py] Re: How to modify the look and text of: Remember me (for 30 days)?

2012-01-23 Thread thstart
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'