form.add_button(value,link)
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 1.99.7 (2012-04-30 11:39:06) dev
|
Version 1.99.7 (2012-04-30 13:45:03) dev
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
{{extend 'layout.html'}}
|
{{extend 'layout.html'}}
|
||||||
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
|
<h2>{{=T( request.args(0).replace('_',' ').capitalize() )}}</h2>
|
||||||
<div id="web2py_user_form">
|
<div id="web2py_user_form">
|
||||||
{{=form}}
|
{{if request.args(0)=='login':}}
|
||||||
{{if request.args(0)=='login':}}
|
{{if not 'register' in auth.settings.actions_disabled:}}
|
||||||
{{if not 'register' in auth.settings.actions_disabled:}}
|
{{form.add_button(T('Register'),URL(args='register'))}}
|
||||||
<br/>
|
{{pass}}
|
||||||
<a href="{{=URL(args='register')}}">{{=T('Register')}}</a>
|
{{form.add_button(T('Lost Password'),URL(args='request_reset_password'))}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{if not 'request_reset_password' in auth.settings.actions_disabled:}}
|
{{=form}}
|
||||||
<br/>
|
|
||||||
<a href="{{=URL(args='request_reset_password')}}">{{=T('Lost Password')}}</a>
|
|
||||||
{{pass}}
|
|
||||||
{{pass}}
|
|
||||||
</div>
|
</div>
|
||||||
<script language="javascript"><!--
|
<script language="javascript"><!--
|
||||||
jQuery("#web2py_user_form input:visible:enabled:first").focus();
|
jQuery("#web2py_user_form input:visible:enabled:first").focus();
|
||||||
|
|||||||
@@ -2006,6 +2006,8 @@ class FORM(DIV):
|
|||||||
self.validate(**kwargs)
|
self.validate(**kwargs)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
def add_button(self,value,url,_class=None):
|
||||||
|
self[0][-1][1].append(INPUT(_type="button",_value=value,_onclick="window.location='%s';return false" % url,_class=_class))
|
||||||
|
|
||||||
class BEAUTIFY(DIV):
|
class BEAUTIFY(DIV):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user