Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Login 如何在web2py中将登录表单丢失的密码按钮更改为超链接?_Login_Web2py - Fatal编程技术网

Login 如何在web2py中将登录表单丢失的密码按钮更改为超链接?

Login 如何在web2py中将登录表单丢失的密码按钮更改为超链接?,login,web2py,Login,Web2py,“丢失密码”按钮通过以下方式添加到默认登录表单: <div id="web2py_user_form"> {{ ... if not 'request_reset_password' in auth.settings.actions_disabled: form.add_button(T('Lost Password'), URL(args='request_reset_password'),

“丢失密码”按钮通过以下方式添加到默认登录表单:

<div id="web2py_user_form">
{{
...
    if not 'request_reset_password' in auth.settings.actions_disabled:
        form.add_button(T('Lost Password'),
                        URL(args='request_reset_password'),
                        _class='btn')
    pass
...
=form
}}

{{
...
如果未禁用auth.settings.actions中的“请求\重置\密码”:
表单。添加按钮(T(“密码丢失”),
URL(args='request\u reset\u password'),
_class='btn')
通过
...
=形式
}}

如何将其从按钮改为html超链接?另外,我希望链接位于“登录”和“注册”按钮的单独一行。

好的,通过查看“添加”按钮的源代码,我了解了如何执行此操作:

<div id="web2py_user_form">
{{
...
    if not 'request_reset_password' in auth.settings.actions_disabled:
        submit_button = form.element('input[type=submit]')
        submit_button.parent.append(DIV(A(T('Lost Password'),
                                   _href=URL(args='request_reset_password'))))
    pass
...
=form
}}

{{
...
如果未禁用auth.settings.actions中的“请求\重置\密码”:
submit_button=form.element('input[type=submit]')
submit_button.parent.append(DIV(A(T)(“密码丢失”),
_href=URL(args='request\u reset\u password'))
通过
...
=形式
}}