fixed add button in grid

This commit is contained in:
mdipierro
2012-09-27 14:21:55 -05:00
parent fd8edb5aa2
commit ae9e2c2be0
2 changed files with 3 additions and 2 deletions

View File

@@ -1 +1 @@
Version 2.0.9 (2012-09-27 14:09:01) stable
Version 2.0.9 (2012-09-27 14:21:51) stable

View File

@@ -1927,7 +1927,7 @@ class SQLFORM(FORM):
search_widget = search_widget[tablename]
if search_widget=='default':
search_menu = SQLFORM.search_menu(sfields)
search_widget = lambda sfield, url: CAT(add,FORM(
search_widget = lambda sfield, url: CAT(FORM(
INPUT(_name='keywords',_value=request.vars.keywords,
_id='web2py_keywords',_onfocus="jQuery('#w2p_query_fields').change();jQuery('#w2p_query_panel').slideDown();"),
INPUT(_type='submit',_value=T('Search'),_class="btn"),
@@ -1935,6 +1935,7 @@ class SQLFORM(FORM):
_onclick="jQuery('#web2py_keywords').val('');"),
_method="GET",_action=url),search_menu)
form = search_widget and search_widget(sfields,url()) or ''
console.append(add)
console.append(form)
keywords = request.vars.get('keywords','')
try: