[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 63dcb8667f24d728393efc878b7de1ec21458e98
Ivan
ivan at 420.am
Mon Jun 4 20:13:25 PDT 2012
The branch, FREESIDE_2_3_BRANCH has been updated
via 63dcb8667f24d728393efc878b7de1ec21458e98 (commit)
from 5c6e504c42a3cc14c29dd9d78541d42efcfc1c09 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 63dcb8667f24d728393efc878b7de1ec21458e98
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Jun 4 20:13:25 2012 -0700
add logout timeout, RT#17057
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index a58218b..aae5f64 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -5041,6 +5041,13 @@ and customer address. Include units.',
'type' => 'checkbox',
},
+ {
+ 'key' => 'logout-timeout',
+ 'section' => 'UI',
+ 'description' => 'If set, automatically log users out of the backoffice after this many minutes.',
+ 'type' => 'text',
+ },
+
{ key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
{ key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
diff --git a/httemplate/elements/header.html b/httemplate/elements/header.html
index d0ab305..c6ad3c3 100644
--- a/httemplate/elements/header.html
+++ b/httemplate/elements/header.html
@@ -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 %>
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Conf.pm | 7 +++++++
httemplate/elements/header.html | 6 ++++++
2 files changed, 13 insertions(+), 0 deletions(-)
More information about the freeside-commits
mailing list