Commit a400777b authored by haemmer's avatar haemmer

Last used IdPs will only be shown if category support is enabled

parent 1615f017
......@@ -95,6 +95,7 @@ var wayf_return_url = "https://my-app.switch.ch/aai/index.php?page=show_welcome"
// Most used Identity Providers will be shown as top category in the drop down
// list if this feature is used.
// Will not be shown if wayf_show_categories is false
// [Optional, default: none]
// var wayf_most_used_idps = new Array("https://aai-logon.unibas.ch/idp/shibboleth", "https://aai.unil.ch/idp/shibboleth");
......@@ -163,6 +164,7 @@ var wayf_return_url = "https://my-app.switch.ch/aai/index.php?page=show_welcome"
// var wayf_default_idp = "https://aai-logon.switch.ch/idp/shibboleth";
// Number of last used IdPs to show
// Will not be shown if wayf_show_categories is false
// Set to 0 to deactivate
// [Optional, default: 3]
// var wayf_num_last_used_idps = 3;
......
......@@ -991,7 +991,7 @@ function loadImprovedDropDown(){
writeHTML('<option value="-"><?php echo $selectIdPString ?> ...</option>');
// Last used
if (wayf_num_last_used_idps > 0 && last_idps.length > 0){
if (wayf_show_categories == true && wayf_num_last_used_idps > 0 && last_idps.length > 0){
if(typeof(wayf_overwrite_most_used_idps_text) == "undefined"){
writeHTML('<optgroup label="<?php echo $lastUsedIdPsString ?>">');
} else {
......@@ -1019,7 +1019,7 @@ function loadImprovedDropDown(){
}
// Favourites
if (wayf_most_used_idps.length > 0){
if (wayf_show_categories == true && wayf_most_used_idps.length > 0){
if(typeof(wayf_overwrite_most_used_idps_text) == "undefined"){
writeHTML('<optgroup label="<?php echo $mostUsedIdPsString ?>">');
} else {
......
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