pls try
e.g.
*models/db.py*
db.table.auth_user.comment = A(_class = "glyphicon glyphicon-plus-sign", 
**{"_data-toggle":"modal", "_data-target":"#modal_table_auth_user"} )

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

*views/default/whatever_that_use_modal.html*
<div class="modal fade" id="modal_table_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('Auth User') ) }}</h4>
</div>
<div class="modal-body">
{{=LOAD('modal', '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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to