Repair activeTimer (#595)
This commit is contained in:
parent
ca6721019c
commit
9a5ecdf1cb
|
@ -61,6 +61,7 @@ sub display {
|
||||||
# 1.1 A notification has to be done (session is created but hidden and
|
# 1.1 A notification has to be done (session is created but hidden and
|
||||||
# unusable until the user has accept the message)
|
# unusable until the user has accept the message)
|
||||||
if ( my $notif = $req->datas->{notification} ) {
|
if ( my $notif = $req->datas->{notification} ) {
|
||||||
|
$self->logger->debug('Display: notification detected');
|
||||||
$skinfile = 'notification';
|
$skinfile = 'notification';
|
||||||
%templateParams = (
|
%templateParams = (
|
||||||
AUTH_ERROR_TYPE => $req->error_type,
|
AUTH_ERROR_TYPE => $req->error_type,
|
||||||
|
@ -75,6 +76,7 @@ sub display {
|
||||||
# 1.2 An authentication (or userDB) module needs to ask a question
|
# 1.2 An authentication (or userDB) module needs to ask a question
|
||||||
# before processing to the request
|
# before processing to the request
|
||||||
elsif ( $req->{error} == PE_CONFIRM ) {
|
elsif ( $req->{error} == PE_CONFIRM ) {
|
||||||
|
$self->logger->debug('Display: confirm detected');
|
||||||
$skinfile = 'confirm';
|
$skinfile = 'confirm';
|
||||||
%templateParams = (
|
%templateParams = (
|
||||||
AUTH_ERROR => $req->error,
|
AUTH_ERROR => $req->error,
|
||||||
|
@ -97,6 +99,7 @@ sub display {
|
||||||
|
|
||||||
# 1.3 There is a message to display
|
# 1.3 There is a message to display
|
||||||
elsif ( my $info = $req->info ) {
|
elsif ( my $info = $req->info ) {
|
||||||
|
$self->logger->debug('Display: info detected');
|
||||||
$skinfile = 'info';
|
$skinfile = 'info';
|
||||||
%templateParams = (
|
%templateParams = (
|
||||||
AUTH_ERROR => $self->error,
|
AUTH_ERROR => $self->error,
|
||||||
|
|
|
@ -150,6 +150,7 @@ sub logout {
|
||||||
sub do {
|
sub do {
|
||||||
my ( $self, $req, $steps ) = @_;
|
my ( $self, $req, $steps ) = @_;
|
||||||
$req->steps($steps);
|
$req->steps($steps);
|
||||||
|
$req->datas->{activeTimer} = $self->conf->{activeTimer};
|
||||||
my $err = $req->error( $self->process($req) );
|
my $err = $req->error( $self->process($req) );
|
||||||
|
|
||||||
# Update status
|
# Update status
|
||||||
|
@ -204,7 +205,7 @@ sub do {
|
||||||
or ( $err == PE_REDIRECT
|
or ( $err == PE_REDIRECT
|
||||||
and $req->datas->{redirectFormMethod}
|
and $req->datas->{redirectFormMethod}
|
||||||
and $req->datas->{redirectFormMethod} eq 'post' )
|
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 ) = @_;
|
my ( $self, $req ) = @_;
|
||||||
|
|
||||||
# Set redirection URL if needed
|
# 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
|
# Redirection should be made if urldc defined
|
||||||
if ( $req->{urldc} and not $req->param('lmError') ) {
|
if ( $req->{urldc} and not $req->param('lmError') ) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ timer = () ->
|
||||||
setTimeout timer, 1000
|
setTimeout timer, 1000
|
||||||
|
|
||||||
$(document).ready ->
|
$(document).ready ->
|
||||||
setTimeout go, 5000
|
setTimeout go, 10000
|
||||||
setTimeout timer, 1000
|
setTimeout timer, 1000
|
||||||
$(".idploop").on 'click', () ->
|
$(".idploop").on 'click', () ->
|
||||||
$("#idp").val $(this).attr("val")
|
$("#idp").val $(this).attr("val")
|
||||||
|
|
|
@ -19,7 +19,7 @@ timer = () ->
|
||||||
|
|
||||||
$(document).ready ->
|
$(document).ready ->
|
||||||
if window.datas['activeTimer']
|
if window.datas['activeTimer']
|
||||||
window.setTimeout go, 10000
|
window.setTimeout go, 30000
|
||||||
window.setTimeout timer, 1000
|
window.setTimeout timer, 1000
|
||||||
else
|
else
|
||||||
stop
|
stop
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
setTimeout(go, 5000);
|
setTimeout(go, 10000);
|
||||||
setTimeout(timer, 1000);
|
setTimeout(timer, 1000);
|
||||||
$(".idploop").on('click', function() {
|
$(".idploop").on('click', function() {
|
||||||
return $("#idp").val($(this).attr("val"));
|
return $("#idp").val($(this).attr("val"));
|
||||||
|
|
|
@ -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);
|
(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);
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if (window.datas['activeTimer']) {
|
if (window.datas['activeTimer']) {
|
||||||
window.setTimeout(go, 10000);
|
window.setTimeout(go, 30000);
|
||||||
window.setTimeout(timer, 1000);
|
window.setTimeout(timer, 1000);
|
||||||
} else {
|
} else {
|
||||||
stop;
|
stop;
|
||||||
|
|
|
@ -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);
|
(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);
|
|
@ -161,7 +161,7 @@
|
||||||
"pwdResetAlreadyIssued":"A password reset request was already issued on ",
|
"pwdResetAlreadyIssued":"A password reset request was already issued on ",
|
||||||
"pwdWillExpire":"%s days, %s hours, %s minutes and %s seconds before password expiration, change it!",
|
"pwdWillExpire":"%s days, %s hours, %s minutes and %s seconds before password expiration, change it!",
|
||||||
"redirectedFrom":"You were redirect from ",
|
"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...",
|
"redirectionInProgres":"Redirection in progress...",
|
||||||
"redirectionToIdp":"Redirection to your Identity Provider",
|
"redirectionToIdp":"Redirection to your Identity Provider",
|
||||||
"refreshrights": "Refresh my rights",
|
"refreshrights": "Refresh my rights",
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
"pwdResetAlreadyIssued":"Une demande de réinitialisation de mot de passe a déjà été faite le ",
|
"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 !",
|
"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 ",
|
"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...",
|
"redirectionInProgres":"Redirection en cours...",
|
||||||
"redirectionToIdp":"Redirection vers votre fournisseur d'identité",
|
"redirectionToIdp":"Redirection vers votre fournisseur d'identité",
|
||||||
"refreshrights": "Rafraîchir mes droits",
|
"refreshrights": "Rafraîchir mes droits",
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<TMPL_IF NAME="ACTIVE_TIMER">
|
<TMPL_IF NAME="ACTIVE_TIMER">
|
||||||
|
|
||||||
<div class="alert alert-info">
|
<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>
|
</div>
|
||||||
|
|
||||||
<!-- //if:jsminified
|
<!-- //if:jsminified
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="alert alert-info">
|
<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>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<button type="submit" class="positive btn btn-success">
|
<button type="submit" class="positive btn btn-success">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user