This is an override of auth.login, which is being used in multiple pages,
not just views/default/user.html. Auth.login already did a lot of things
with custom CSS classes that I'd like to keep using. At the moment I'm
doing the following:
{{top_login_form = auth.login(next =
page_currentPath_get(request))}}
{{
top_login_form.elements('form')[0]['_class'] =
'login_form'
(begin, end) = top_login_form._xml()
top_login_form.custom.begin = XML("<%s %s>" %
(top_login_form.tag, begin))
}}
{{=top_login_form.custom.begin}}
On Wednesday, February 27, 2013 4:25:16 PM UTC-5, Niphlod wrote:
>
> your own template instead of the standard one defined in
> views/default/user.html ?
>
> On Wednesday, February 27, 2013 10:20:26 PM UTC+1, Chris wrote:
>>
>> Hello,
>>
>> I have a form that looks like this:
>> {{top_login_form = auth.login(next =
>> page_currentPath_get(request))}}
>> {{top_login_form.elements('form')[0]['_class'] =
>> 'login_form'}}
>> {{=top_login_form.custom.begin}}
>>
>> Trouble is, auth.login calls SQLFORM and sets custom.begin before the
>> '_class' attribute takes effect, and auth.login doesn't take custom
>> attributes. It seems like the long term solution might be to have
>> custom.begin be a method - in the meantime I'm probably going to overwrite
>> custom.begin myself. Any suggestions?
>>
>> Thanks!
>>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.