diff --git a/modules/lemonldap-ng-portal/example/index_skin.pl b/modules/lemonldap-ng-portal/example/index_skin.pl index 5e58d1dc3..cde652b86 100755 --- a/modules/lemonldap-ng-portal/example/index_skin.pl +++ b/modules/lemonldap-ng-portal/example/index_skin.pl @@ -166,6 +166,7 @@ else { DISPLAY_FORM => 1, MAIL_URL => $portal->{mailUrl}, HIDDEN_INPUTS => $portal->buildHiddenForm(), + LOGIN_INFO => $portal->loginInfo(), ); # Adapt template if password policy error diff --git a/modules/lemonldap-ng-portal/example/skins/impact/login.tpl b/modules/lemonldap-ng-portal/example/skins/impact/login.tpl index 2e098a06e..4e3a4ac06 100644 --- a/modules/lemonldap-ng-portal/example/skins/impact/login.tpl +++ b/modules/lemonldap-ng-portal/example/skins/impact/login.tpl @@ -11,6 +11,13 @@

+ + +
+ +
+
+

diff --git a/modules/lemonldap-ng-portal/example/skins/pastel/login.tpl b/modules/lemonldap-ng-portal/example/skins/pastel/login.tpl index 25da16211..c52d3b7e4 100644 --- a/modules/lemonldap-ng-portal/example/skins/pastel/login.tpl +++ b/modules/lemonldap-ng-portal/example/skins/pastel/login.tpl @@ -73,6 +73,12 @@ + + + +
diff --git a/modules/lemonldap-ng-portal/example/skins/pastel/styles.css b/modules/lemonldap-ng-portal/example/skins/pastel/styles.css index 470d2031b..8d32f01a9 100644 --- a/modules/lemonldap-ng-portal/example/skins/pastel/styles.css +++ b/modules/lemonldap-ng-portal/example/skins/pastel/styles.css @@ -386,8 +386,9 @@ p.removeOther{ font-weight:bold; } -div.link { +div.link, div.login_info { text-align:center; font-weight:bold; margin:40px 200px; } + diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/IssuerDBSAML.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/IssuerDBSAML.pm index a0dc29728..065ceba25 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/IssuerDBSAML.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/IssuerDBSAML.pm @@ -188,6 +188,14 @@ sub issuerForUnAuthUser { $self->{_proxiedRelayState} = $relaystate; $self->{_proxiedArtifact} = $artifact; + # Create a back link on SP displayed on login page + my $html = "referer() . "\">"; + $html .= + &Lemonldap::NG::Portal::_i18n::msg( PM_BACKTOSP, + $ENV{HTTP_ACCEPT_LANGUAGE} ); + $html .= ""; + $self->loginInfo($html); + return PE_OK; } diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm index 5cb23e583..7963e187f 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm @@ -123,6 +123,7 @@ use constant { PM_REMEMBERCHOICE => 10, PM_SAML_SPLOGOUT => 11, PM_REDIRECTION => 12, + PM_BACKTOSP => 13, }; # EXPORTER PARAMETERS @@ -145,7 +146,7 @@ our @EXPORT = qw( PE_IMG_NOK PE_IMG_OK PE_INFO PE_REDIRECT PE_DONE PE_OK PM_USER PM_DATE PM_IP PM_SESSIONS_DELETED PM_OTHER_SESSIONS PM_REMOVE_OTHER_SESSIONS PM_PP_GRACE PM_PP_EXP_WARNING PM_SAML_IDPSELECT PM_SAML_IDPCHOOSEN PM_REMEMBERCHOICE PM_SAML_SPLOGOUT - PM_REDIRECTION + PM_REDIRECTION PM_BACKTOSP ); our %EXPORT_TAGS = ( 'all' => [ @EXPORT, 'import' ], ); @@ -832,6 +833,16 @@ sub info { return $self->{_info}; } +##@method protected string loginInfo(string t) +# Get or set info to display to the user on login screen +# @param $t optional text to store +# @return HTML text to display +sub loginInfo { + my ( $self, $t ) = @_; + $self->{_loginInfo} .= $t if ( defined $t ); + return $self->{_loginInfo}; +} + ##@method public void printImage(string file, string type) # Print image to STDOUT # @param $file The path to the file to print diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_i18n.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_i18n.pm index 32213d5e5..029dbe7a5 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_i18n.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_i18n.pm @@ -351,6 +351,7 @@ sub error_ro { # * PM_REMEMBERCHOICE 10 # * PM_SAML_SPLOGOUT 11 # * PM_REDIRECTION 12 +# * PM_BACKTOSP 13 sub msg_en { use utf8; @@ -368,6 +369,7 @@ sub msg_en { 'Remember my choice', 'Logout from service providers...', 'Redirection in progress...', + 'Go back to service provider', ]; } @@ -387,6 +389,7 @@ sub msg_fr { 'Se souvenir de mon choix', 'Déconnexion des services...', 'Redirection en cours...', + 'Retourner sur le fournisseur de service', ]; }