Commit 9a5ecdf1 authored by Xavier Guimard's avatar Xavier Guimard

Repair activeTimer (#595)

parent ca672101
......@@ -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,
......
......@@ -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') ) {
......
......@@ -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")
......
......@@ -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
......
......@@ -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"));
......
(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
......@@ -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;
......
(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
......@@ -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",
......
......@@ -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",
......
......@@ -63,7 +63,7 @@
<TMPL_IF NAME="ACTIVE_TIMER">
<div class="alert alert-info">
<p id="timer" trspan="autoAccept">Automatically accept in 5 seconds</p>
<p id="timer" trspan="autoAccept">Automatically accept in 30 seconds</p>
</div>
<!-- //if:jsminified
......
......@@ -17,7 +17,7 @@
</div>
</div>
<div class="alert alert-info">
<p id="timer" trspan="redirectedIn">You'll be redirected in 10 seconds</p>
<p id="timer" trspan="redirectedIn">You'll be redirected in 30 seconds</p>
</div>
<div class="buttons">
<button type="submit" class="positive btn btn-success">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment