diff --git a/modules/multiauth/templates/selectsource.twig b/modules/multiauth/templates/selectsource.twig index 81fc1a6a997c23fb50a0131db238087bba0d8372..d308d457afa092088005cea3e90f8199ac811efd 100644 --- a/modules/multiauth/templates/selectsource.twig +++ b/modules/multiauth/templates/selectsource.twig @@ -17,6 +17,9 @@ {% else %} <input type="submit" name="{{ name|escape('html') }}" id="{{ button|escape('html') }}" value="{{ source.text|escape('html') }}" /> {% endif %} + {% if source.help %} + <p>{{ source.help|escape('html') }}</p> + {% endif %} </li> {% endfor %} </ul> diff --git a/modules/multiauth/www/selectsource.php b/modules/multiauth/www/selectsource.php index 1736263be8a2f261cde1948cc8b0e71d397d7c3b..af8c454e7a5b936d388cf9ce01b24ab553b5d40d 100644 --- a/modules/multiauth/www/selectsource.php +++ b/modules/multiauth/www/selectsource.php @@ -16,7 +16,6 @@ if (!array_key_exists('AuthState', $_REQUEST)) { } $authStateId = $_REQUEST['AuthState']; $state = SimpleSAML_Auth_State::loadState($authStateId, sspmod_multiauth_Auth_Source_MultiAuth::STAGEID); - if (array_key_exists("SimpleSAML_Auth_Source.id", $state)) { $authId = $state["SimpleSAML_Auth_Source.id"]; $as = SimpleSAML_Auth_Source::getById($authId); @@ -49,12 +48,15 @@ if (array_key_exists('multiauth:preselect', $state)) { $globalConfig = SimpleSAML_Configuration::getInstance(); $t = new SimpleSAML_XHTML_Template($globalConfig, 'multiauth:selectsource.php'); + +$defaultLanguage = $globalConfig->getString('language.default', 'en'); $language = $t->getLanguage(); $sources = $state[sspmod_multiauth_Auth_Source_MultiAuth::SOURCESID]; foreach ($sources as $key => $source){ $sources[$key]['source64'] = base64_encode($sources[$key]['source']); - $sources[$key]['text'] = $sources[$key]['text'][$language]; + $sources[$key]['text'] = (isSet($sources[$key]['text'][$language]) ? $sources[$key]['text'][$language] : $sources[$key]['text'][$defaultLanguage]); + $sources[$key]['help'] = (isSet($sources[$key]['help'][$language]) ? $sources[$key]['help'][$language] : $sources[$key]['help'][$defaultLanguage]); } $t->data['authstate'] = $authStateId;