Commit 87c85c5b authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

Append manager option to enable langs display (#1539)

parent 5bcab88c
...@@ -249,6 +249,7 @@ sub defaultValues { ...@@ -249,6 +249,7 @@ sub defaultValues {
'securedCookie' => 0, 'securedCookie' => 0,
'sfEngine' => '::2F::Engines::Default', 'sfEngine' => '::2F::Engines::Default',
'sfRequired' => 0, 'sfRequired' => 0,
'showLanguages' => 1,
'slaveAuthnLevel' => 2, 'slaveAuthnLevel' => 2,
'slaveExportedVars' => {}, 'slaveExportedVars' => {},
'SMTPServer' => '', 'SMTPServer' => '',
......
...@@ -3103,6 +3103,10 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.] ...@@ -3103,6 +3103,10 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'default' => 0, 'default' => 0,
'type' => 'boolOrExpr' 'type' => 'boolOrExpr'
}, },
'showLanguages' => {
'default' => 1,
'type' => 'bool'
},
'singleIP' => { 'singleIP' => {
'default' => 0, 'default' => 0,
'type' => 'bool' 'type' => 'bool'
......
...@@ -379,6 +379,11 @@ sub attributes { ...@@ -379,6 +379,11 @@ sub attributes {
default => 'common/logos/logo_llng_400px.png', default => 'common/logos/logo_llng_400px.png',
documentation => 'Portal main logo path', documentation => 'Portal main logo path',
}, },
showLanguages => {
type => 'bool',
default => 1,
documentation => 'Display langs icons',
},
staticPrefix => { staticPrefix => {
type => 'text', type => 'text',
documentation => 'Prefix of static files for HTML templates', documentation => 'Prefix of static files for HTML templates',
......
...@@ -51,6 +51,7 @@ sub tree { ...@@ -51,6 +51,7 @@ sub tree {
help => 'portalcustom.html', help => 'portalcustom.html',
nodes => [ nodes => [
'portalMainLogo', 'portalMainLogo',
'showLanguages',
'portalSkin', 'portalSkin',
'portalSkinBackground', 'portalSkinBackground',
'portalSkinRules', 'portalSkinRules',
......
...@@ -686,6 +686,7 @@ ...@@ -686,6 +686,7 @@
"sfRequired":"Require 2FA", "sfRequired":"Require 2FA",
"show":"عرض", "show":"عرض",
"showHelp":"عرض المساعدة", "showHelp":"عرض المساعدة",
"showLanguages":"Show languages choice",
"singleIP":"عنوان آي بي واحد لكل مستخدم", "singleIP":"عنوان آي بي واحد لكل مستخدم",
"singleSession":"جلسة واحدة فقط من قبل المستخدم", "singleSession":"جلسة واحدة فقط من قبل المستخدم",
"singleUserByIP":"مستخدم واحد لكل عنوان آي بي", "singleUserByIP":"مستخدم واحد لكل عنوان آي بي",
......
...@@ -686,6 +686,7 @@ ...@@ -686,6 +686,7 @@
"sfRequired":"Require 2FA", "sfRequired":"Require 2FA",
"show":"Show", "show":"Show",
"showHelp":"Show help", "showHelp":"Show help",
"showLanguages":"Show languages choice",
"singleIP":"One IP only by user", "singleIP":"One IP only by user",
"singleSession":"One session only by user", "singleSession":"One session only by user",
"singleUserByIP":"One user by IP address", "singleUserByIP":"One user by IP address",
......
...@@ -686,6 +686,7 @@ ...@@ -686,6 +686,7 @@
"sfaTitle":"Seconds Facteurs d'Authentification", "sfaTitle":"Seconds Facteurs d'Authentification",
"show":"Montrer", "show":"Montrer",
"showHelp":"Montrer l'aide", "showHelp":"Montrer l'aide",
"showLanguages":"Afficher le choix des langues",
"singleIP":"Une seule session par couple utilisateur/IP", "singleIP":"Une seule session par couple utilisateur/IP",
"singleSession":"Une seule session par utilisateur", "singleSession":"Une seule session par utilisateur",
"singleUserByIP":"Un seul utilisateur par IP", "singleUserByIP":"Un seul utilisateur par IP",
......
...@@ -686,6 +686,7 @@ ...@@ -686,6 +686,7 @@
"sfRequired":"Require 2FA", "sfRequired":"Require 2FA",
"show":"Mostra", "show":"Mostra",
"showHelp":"Mostra aiuto", "showHelp":"Mostra aiuto",
"showLanguages":"Show languages choice",
"singleIP":"Solo un IP per utente", "singleIP":"Solo un IP per utente",
"singleSession":"Una sola sessione per utente", "singleSession":"Una sola sessione per utente",
"singleUserByIP":"Un utente per indirizzo IP", "singleUserByIP":"Un utente per indirizzo IP",
......
...@@ -685,6 +685,7 @@ ...@@ -685,6 +685,7 @@
"sfaTitle":"Second Factors Authentication", "sfaTitle":"Second Factors Authentication",
"sfRequired":"Require 2FA", "sfRequired":"Require 2FA",
"show":"Hiển thị", "show":"Hiển thị",
"showLanguages":"Show languages choice",
"showHelp":"Hiển thị trợ giúp", "showHelp":"Hiển thị trợ giúp",
"singleIP":"Chỉ một địa chỉ IP bởi người dùng", "singleIP":"Chỉ một địa chỉ IP bởi người dùng",
"singleSession":"Một phiên chỉ bởi người dùng", "singleSession":"Một phiên chỉ bởi người dùng",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -69,6 +69,7 @@ sub display { ...@@ -69,6 +69,7 @@ sub display {
$skinfile = 'confirm'; $skinfile = 'confirm';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo}, MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $req->error, AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
AUTH_URL => $req->{data}->{_url}, AUTH_URL => $req->{data}->{_url},
...@@ -98,6 +99,7 @@ sub display { ...@@ -98,6 +99,7 @@ sub display {
$skinfile = 'idpchoice'; $skinfile = 'idpchoice';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo}, MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $req->error, AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
AUTH_URL => $req->{data}->{_url}, AUTH_URL => $req->{data}->{_url},
...@@ -128,6 +130,7 @@ sub display { ...@@ -128,6 +130,7 @@ sub display {
$skinfile = 'info'; $skinfile = 'info';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo}, MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $self->error, AUTH_ERROR => $self->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
MSG => $info, MSG => $info,
...@@ -156,6 +159,7 @@ sub display { ...@@ -156,6 +159,7 @@ sub display {
->{ $self->conf->{openIdAttr} || $self->conf->{whatToTrace} }; ->{ $self->conf->{openIdAttr} || $self->conf->{whatToTrace} };
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo}, MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $self->error, AUTH_ERROR => $self->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
PROVIDERURI => $p, PROVIDERURI => $p,
...@@ -193,6 +197,7 @@ sub display { ...@@ -193,6 +197,7 @@ sub display {
#utf8::decode($auth_user); #utf8::decode($auth_user);
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo}, MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_USER => $req->{sessionInfo}->{ $self->conf->{portalUserAttr} }, AUTH_USER => $req->{sessionInfo}->{ $self->conf->{portalUserAttr} },
NEWWINDOW => $self->conf->{portalOpenLinkInNewWindow}, NEWWINDOW => $self->conf->{portalOpenLinkInNewWindow},
LOGOUT_URL => $self->conf->{portal} . "?logout=1", LOGOUT_URL => $self->conf->{portal} . "?logout=1",
...@@ -213,6 +218,7 @@ sub display { ...@@ -213,6 +218,7 @@ sub display {
$skinfile = 'upgradesession'; $skinfile = 'upgradesession';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo}, MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
MSG => 'askToRenew', MSG => 'askToRenew',
CONFIRMKEY => $self->stamp, CONFIRMKEY => $self->stamp,
PORTAL => $self->conf->{portal}, PORTAL => $self->conf->{portal},
...@@ -229,6 +235,7 @@ sub display { ...@@ -229,6 +235,7 @@ sub display {
$skinfile = 'updatesession'; $skinfile = 'updatesession';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo}, MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
MSG => 'PE87', MSG => 'PE87',
CONFIRMKEY => $self->stamp, CONFIRMKEY => $self->stamp,
PORTAL => $self->conf->{portal}, PORTAL => $self->conf->{portal},
...@@ -252,6 +259,7 @@ sub display { ...@@ -252,6 +259,7 @@ sub display {
$skinfile = 'error'; $skinfile = 'error';
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo}, MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $req->error, AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
( (
...@@ -269,6 +277,7 @@ sub display { ...@@ -269,6 +277,7 @@ sub display {
$login = '' if ( $login eq 'anonymous' ); $login = '' if ( $login eq 'anonymous' );
%templateParams = ( %templateParams = (
MAIN_LOGO => $self->conf->{portalMainLogo}, MAIN_LOGO => $self->conf->{portalMainLogo},
LANGS => $self->conf->{showLanguages},
AUTH_ERROR => $req->error, AUTH_ERROR => $req->error,
AUTH_ERROR_TYPE => $req->error_type, AUTH_ERROR_TYPE => $req->error_type,
AUTH_URL => $req->{data}->{_url}, AUTH_URL => $req->{data}->{_url},
......
...@@ -6,14 +6,16 @@ ...@@ -6,14 +6,16 @@
<div class="col-md-8 col-10"> <div class="col-md-8 col-10">
<TMPL_INCLUDE NAME="customfooter.tpl"> <TMPL_INCLUDE NAME="customfooter.tpl">
</div> </div>
<TMPL_IF NAME="LANGS">
<div class="col-md-2 col-2 text-right"> <div class="col-md-2 col-2 text-right">
<span id="languages"></span> <span id="languages"></span>
</div> </div>
</TMPL_IF>
</div> </div>
</div> </div>
<!-- Constants --> <!-- Constants -->
<script type="text/JavaScript" src="<TMPL_VAR NAME="SCRIPTNAME">/psgi.js"></script> <script type="text/JavaScript" src="<TMPL_VAR NAME="SCRIPTNAME">psgi.js"></script>
</body> </body>
</html> </html>
...@@ -39,15 +39,15 @@ ...@@ -39,15 +39,15 @@
<TMPL_INCLUDE NAME="../common/script.tpl"> <TMPL_INCLUDE NAME="../common/script.tpl">
<!-- //if:usedebianlibs <!-- //if:usedebianlibs
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX"><TMPL_VAR NAME="SKIN">/js/skin.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX"><TMPL_VAR NAME="SKIN">/js/skin.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/portal.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/portal.min.js"></script>
<script type="text/javascript" src="/javascript/bootstrap/js/bootstrap.min.js"></script> <script type="text/javascript" src="/javascript/bootstrap/js/bootstrap.min.js"></script>
//elsif:jsminified //elsif:jsminified
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX"><TMPL_VAR NAME="SKIN">/js/skin.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX"><TMPL_VAR NAME="SKIN">/js/skin.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/portal.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/portal.min.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/js/bootstrap.min.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/js/bootstrap.min.js"></script>
//else --> //else -->
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX"><TMPL_VAR NAME="SKIN">/js/skin.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX"><TMPL_VAR NAME="SKIN">/js/skin.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">/common/js/portal.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">common/js/portal.js"></script>
<script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/js/bootstrap.js"></script> <script type="text/javascript" src="<TMPL_VAR NAME="STATIC_PREFIX">bwr/bootstrap/dist/js/bootstrap.js"></script>
<!-- //endif --> <!-- //endif -->
<TMPL_VAR NAME="CUSTOM_SCRIPT"> <TMPL_VAR NAME="CUSTOM_SCRIPT">
......
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