$(".loginModal-trigger").on("click",function(e){
e.preventDefault();
var button = $(this);
var context = button.data('return');
if ( context ) {
$('#modalAuth').append('<input type="hidden" name="return" value="'+window.location+'" />');
}
$("#loginModal").modal("show");
});
$("#loginModal").on("shown.bs.modal", function(){
);
# if not an empty string this indicates to return
# back to the page we triggered the login from
my $return = $query->param('return');
if ( $return ) {
print $query->redirect(
-uri => $return,
-cookie => $cookie,
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
-