add logout timeout, RT#17057
[freeside.git] / httemplate / elements / header.html
index d0ab305..c6ad3c3 100644 (file)
@@ -42,6 +42,12 @@ Example:
     <% include('init_overlib.html') |n %>
     <% include('rs_init_object.html') |n %>
     <% include('logout.html') |n %>
+%   my $timeout =  $conf->config('logout-timeout');
+%   if ( $timeout && $timeout =~ /^\s*\d+\s*$/ ) {
+      <script type="text/javascript">
+        setTimeout('logout()', <% 60000 * $timeout %>);
+      </script>
+%   }
 
     <% $head |n %>