*pls try :*
*controllers/default.py*
def modal_auth_user():
table = db.auth_user
fields = None
target_response = '(function($) 
{$("#modal_auth_user").modal("hide");}(jQuery));'
form = SQLFORM(table, fields = fields)
if form.process(formname = 'form_modal').accepted:
response.js = target_response
redirect(request.env.http_web2py_component_location, client_side = True)
elif form.errors:
response.flash = 'form has errors'
return dict(form = form)

*views/default/index.html*
{{extend 'layout.html'}}

{{=H3(T('Test'), _class = 'text-info') }}

{{=LOAD('default', 'test.load', ajax = True, 
target = 'test') }}

*views/default/test.load*
{{=form}}

<div class="modal fade" id="modal_auth_user" tabindex="-1" role="dialog" 
aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" 
aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">{{=DIV(T('User') ) }}</h4>
</div>
<div class="modal-body">
{{=LOAD('default', 'modal_auth_user.load', ajax = True) }}
</div>
</div>
</div>
</div>

best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to