diff --git a/templates/web/validate_token.tt2.html b/templates/web/validate_token.tt2.html
index 53126761ebeda10228e5eac887ace27f515bbe13..a89d55b8b03a3d6fd854266391386ac40c85b334 100644
--- a/templates/web/validate_token.tt2.html
+++ b/templates/web/validate_token.tt2.html
@@ -6,17 +6,20 @@ jQuery(document).ready(function($){
     $( ".account_details" ).dialog({
         title: "Account details",
         autoOpen: false,
+        width: 0.8*$(window).width(),
         buttons: {
             Ok: function() {
                 $( this ).dialog( "close" );
             }
         }
     });
-    [% FOREACH account IN test_accounts %]
-    $( "#show_account_details_[% account.get('id') %]" ).click(function() {
-        $("#account_details_[% account.get('id') %]").dialog( "open" );
+    $( ".show_account_details" ).click(function(e) {
+        var id = $(this).attr('id').substr(5);
+        $("#" + id).dialog( "open" );
+        e.stopPropagation();
+        e.preventDefault();
+        return false;
     });
-    [% END %]
 });
 
 </script>