View | Details | Raw Unified | Return to bug 40336
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt (-1 / +1 lines)
Lines 301-307 Link Here
301
            function login_timeout(){
301
            function login_timeout(){
302
                //NOTE: There can only be 1 sci_login_timer at a time
302
                //NOTE: There can only be 1 sci_login_timer at a time
303
                if ( ! window.sci_login_timer ){
303
                if ( ! window.sci_login_timer ){
304
                    const idleTimeout = "[% Koha.Preference('SelfCheckInTimeOut') || 120 | html %]";
304
                    const idleTimeout = "[% Koha.Preference('SelfCheckInTimeOut') | html %]";
305
                    const home_href = "/cgi-bin/koha/sci/sci-main.pl";
305
                    const home_href = "/cgi-bin/koha/sci/sci-main.pl";
306
                    const sci_timer = new sc_timer({
306
                    const sci_timer = new sc_timer({
307
                        "idle_timeout": idleTimeout,
307
                        "idle_timeout": idleTimeout,
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-1 / +1 lines)
Lines 420-426 Link Here
420
                function login_timeout(){
420
                function login_timeout(){
421
                    //NOTE: There can only be 1 sco_login_timer at a time
421
                    //NOTE: There can only be 1 sco_login_timer at a time
422
                    if ( ! window.sco_login_timer ){
422
                    if ( ! window.sco_login_timer ){
423
                        const idleTimeout = "[% Koha.Preference('SelfCheckTimeout') || 120 | html %]";
423
                        const idleTimeout = "[% Koha.Preference('SelfCheckTimeout') | html %]";
424
                        const home_href = "/cgi-bin/koha/sco/sco-main.pl?op=logout";
424
                        const home_href = "/cgi-bin/koha/sco/sco-main.pl?op=logout";
425
                        const sco_timer = new sc_timer({
425
                        const sco_timer = new sc_timer({
426
                            "idle_timeout": idleTimeout,
426
                            "idle_timeout": idleTimeout,
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/timeout.js (-3 / +5 lines)
Lines 1-9 Link Here
1
class sc_timer {
1
class sc_timer {
2
    constructor(args) {
2
    constructor(args) {
3
        const idle_timeout = args["idle_timeout"];
3
        const idle_timeout = Number(args["idle_timeout"]);
4
        const redirect_url = args["redirect_url"];
4
        const redirect_url = args["redirect_url"];
5
        if (idle_timeout) {
5
        const idle_timeout_minimum = 10;
6
        if (idle_timeout && idle_timeout >= idle_timeout_minimum) {
6
            this.idle_timeout = idle_timeout;
7
            this.idle_timeout = idle_timeout;
8
        } else {
9
            this.idle_timeout = 120;
7
        }
10
        }
8
        if (redirect_url) {
11
        if (redirect_url) {
9
            this.redirect_url = redirect_url;
12
            this.redirect_url = redirect_url;
10
- 

Return to bug 40336