diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm index 6256ac958..afd1a0e0d 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Display.pm @@ -61,6 +61,7 @@ sub display { # 1.1 A notification has to be done (session is created but hidden and # unusable until the user has accept the message) if ( my $notif = $req->datas->{notification} ) { + $self->logger->debug('Display: notification detected'); $skinfile = 'notification'; %templateParams = ( AUTH_ERROR_TYPE => $req->error_type, @@ -75,6 +76,7 @@ sub display { # 1.2 An authentication (or userDB) module needs to ask a question # before processing to the request elsif ( $req->{error} == PE_CONFIRM ) { + $self->logger->debug('Display: confirm detected'); $skinfile = 'confirm'; %templateParams = ( AUTH_ERROR => $req->error, @@ -97,6 +99,7 @@ sub display { # 1.3 There is a message to display elsif ( my $info = $req->info ) { + $self->logger->debug('Display: info detected'); $skinfile = 'info'; %templateParams = ( AUTH_ERROR => $self->error, diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm index 158e0f0eb..8a42549c8 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm @@ -150,6 +150,7 @@ sub logout { sub do { my ( $self, $req, $steps ) = @_; $req->steps($steps); + $req->datas->{activeTimer} = $self->conf->{activeTimer}; my $err = $req->error( $self->process($req) ); # Update status @@ -204,7 +205,7 @@ sub do { or ( $err == PE_REDIRECT and $req->datas->{redirectFormMethod} and $req->datas->{redirectFormMethod} eq 'post' ) - or ( $err == PE_REDIRECT and $req->info ) + or $req->info ) ) { @@ -254,7 +255,8 @@ sub autoRedirect { my ( $self, $req ) = @_; # Set redirection URL if needed - $req->{urldc} ||= $self->conf->{portal} if ( $req->mustRedirect ); + $req->{urldc} ||= $self->conf->{portal} + if ( $req->mustRedirect and not( $req->info ) ); # Redirection should be made if urldc defined if ( $req->{urldc} and not $req->param('lmError') ) { diff --git a/lemonldap-ng-portal/site/coffee/confirm.coffee b/lemonldap-ng-portal/site/coffee/confirm.coffee index b3f08a568..7c4f2e7bb 100644 --- a/lemonldap-ng-portal/site/coffee/confirm.coffee +++ b/lemonldap-ng-portal/site/coffee/confirm.coffee @@ -13,7 +13,7 @@ timer = () -> setTimeout timer, 1000 $(document).ready -> - setTimeout go, 5000 + setTimeout go, 10000 setTimeout timer, 1000 $(".idploop").on 'click', () -> $("#idp").val $(this).attr("val") diff --git a/lemonldap-ng-portal/site/coffee/info.coffee b/lemonldap-ng-portal/site/coffee/info.coffee index 90ca4f9b9..d76bd32b0 100644 --- a/lemonldap-ng-portal/site/coffee/info.coffee +++ b/lemonldap-ng-portal/site/coffee/info.coffee @@ -19,7 +19,7 @@ timer = () -> $(document).ready -> if window.datas['activeTimer'] - window.setTimeout go, 10000 + window.setTimeout go, 30000 window.setTimeout timer, 1000 else stop diff --git a/lemonldap-ng-portal/site/htdocs/static/common/js/confirm.js b/lemonldap-ng-portal/site/htdocs/static/common/js/confirm.js index 08ef12ddd..a6487a160 100644 --- a/lemonldap-ng-portal/site/htdocs/static/common/js/confirm.js +++ b/lemonldap-ng-portal/site/htdocs/static/common/js/confirm.js @@ -20,7 +20,7 @@ }; $(document).ready(function() { - setTimeout(go, 5000); + setTimeout(go, 10000); setTimeout(timer, 1000); $(".idploop").on('click', function() { return $("#idp").val($(this).attr("val")); diff --git a/lemonldap-ng-portal/site/htdocs/static/common/js/confirm.min.js b/lemonldap-ng-portal/site/htdocs/static/common/js/confirm.min.js index 0b3b50cd6..2208d4937 100644 --- a/lemonldap-ng-portal/site/htdocs/static/common/js/confirm.min.js +++ b/lemonldap-ng-portal/site/htdocs/static/common/js/confirm.min.js @@ -1 +1 @@ -(function(){var b,a,c;a=5;b=function(){return $("#form").submit()};c=function(){var d;d=$("#timer").html();if(a>0){a--}d=d.replace(/\d+/,a);$("#timer").html(d);return setTimeout(c,1000)};$(document).ready(function(){setTimeout(b,5000);setTimeout(c,1000);$(".idploop").on("click",function(){return $("#idp").val($(this).attr("val"))});return $("#refuse").on("click",function(){return $("#confirm").attr("value",$(this).attr("val"))})})}).call(this); \ No newline at end of file +(function(){var b,a,c;a=5;b=function(){return $("#form").submit()};c=function(){var d;d=$("#timer").html();if(a>0){a--}d=d.replace(/\d+/,a);$("#timer").html(d);return setTimeout(c,1000)};$(document).ready(function(){setTimeout(b,10000);setTimeout(c,1000);$(".idploop").on("click",function(){return $("#idp").val($(this).attr("val"))});return $("#refuse").on("click",function(){return $("#confirm").attr("value",$(this).attr("val"))})})}).call(this); \ No newline at end of file diff --git a/lemonldap-ng-portal/site/htdocs/static/common/js/info.js b/lemonldap-ng-portal/site/htdocs/static/common/js/info.js index 7d9989951..27dfe3bd0 100644 --- a/lemonldap-ng-portal/site/htdocs/static/common/js/info.js +++ b/lemonldap-ng-portal/site/htdocs/static/common/js/info.js @@ -30,7 +30,7 @@ $(document).ready(function() { if (window.datas['activeTimer']) { - window.setTimeout(go, 10000); + window.setTimeout(go, 30000); window.setTimeout(timer, 1000); } else { stop; diff --git a/lemonldap-ng-portal/site/htdocs/static/common/js/info.min.js b/lemonldap-ng-portal/site/htdocs/static/common/js/info.min.js index b3b845026..4efb0ee78 100644 --- a/lemonldap-ng-portal/site/htdocs/static/common/js/info.min.js +++ b/lemonldap-ng-portal/site/htdocs/static/common/js/info.min.js @@ -1 +1 @@ -(function(){var a,d,c,b,e;c=30;a=1;b=function(){a=0;return $("#timer").html("...")};d=function(){if(a){return $("#form").submit()}};e=function(){var f;f=$("#timer").html();if(c>0){c--}f=f.replace(/\d+/,c);$("#timer").html(f);return window.setTimeout(e,1000)};$(document).ready(function(){if(window.datas.activeTimer){window.setTimeout(d,10000);window.setTimeout(e,1000)}else{b}return $("#wait").on("click",function(){return b()})})}).call(this); \ No newline at end of file +(function(){var a,d,c,b,e;c=30;a=1;b=function(){a=0;return $("#timer").html("...")};d=function(){if(a){return $("#form").submit()}};e=function(){var f;f=$("#timer").html();if(c>0){c--}f=f.replace(/\d+/,c);$("#timer").html(f);return window.setTimeout(e,1000)};$(document).ready(function(){if(window.datas.activeTimer){window.setTimeout(d,30000);window.setTimeout(e,1000)}else{b}return $("#wait").on("click",function(){return b()})})}).call(this); \ No newline at end of file diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/en.json b/lemonldap-ng-portal/site/htdocs/static/languages/en.json index db1e8fab2..813d379a6 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/en.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/en.json @@ -161,7 +161,7 @@ "pwdResetAlreadyIssued":"A password reset request was already issued on ", "pwdWillExpire":"%s days, %s hours, %s minutes and %s seconds before password expiration, change it!", "redirectedFrom":"You were redirect from ", -"redirectedIn":"You'll be redirected in 10 seconds", +"redirectedIn":"You'll be redirected in 30 seconds", "redirectionInProgres":"Redirection in progress...", "redirectionToIdp":"Redirection to your Identity Provider", "refreshrights": "Refresh my rights", diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/fr.json b/lemonldap-ng-portal/site/htdocs/static/languages/fr.json index 9f5f3eafb..d346c90df 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/fr.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/fr.json @@ -161,7 +161,7 @@ "pwdResetAlreadyIssued":"Une demande de réinitialisation de mot de passe a déjà été faite le ", "pwdWillExpire":"%s jours, %s heures, %s minutes et %s secondes avant expiration de votre mot de passe, pensez à le changer !", "redirectedFrom":"Vous avez été redirigé depuis ", -"redirectedIn":"Vous allez être redirigé(e) automatiquement dans 10 secondes", +"redirectedIn":"Vous allez être redirigé(e) automatiquement dans 30 secondes", "redirectionInProgres":"Redirection en cours...", "redirectionToIdp":"Redirection vers votre fournisseur d'identité", "refreshrights": "Rafraîchir mes droits", diff --git a/lemonldap-ng-portal/site/templates/bootstrap/confirm.tpl b/lemonldap-ng-portal/site/templates/bootstrap/confirm.tpl index c26795730..9ba0a81d0 100644 --- a/lemonldap-ng-portal/site/templates/bootstrap/confirm.tpl +++ b/lemonldap-ng-portal/site/templates/bootstrap/confirm.tpl @@ -63,7 +63,7 @@
-

Automatically accept in 5 seconds

+

Automatically accept in 30 seconds