Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 8c00275

Browse files
committed
Show only user's last selected IdP and button to show all IdPs.
If user's last selected IdP is known then show only this IdP and button to show all IdPs
1 parent 81ecf3c commit 8c00275

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
88
- Width of entities is now counted automatically
99
- Social IdP has 'Sign in with' before name, Preferred IdP hasn't
1010
- Added possibility to change display name in attribute 'fullDisplayName' in metadata
11+
- If user's last selected IdP is known then show only this IdP and button to show all IdPs
1112

1213
#### Fixed
1314
- Fixed the bug in 'getEntitylesAttribute' function to return correct value of Entityless attribute

dictionaries/disco.definition.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
"en": "your institutional account",
1616
"cs": "váš univerzitní účet"
1717
},
18+
"sign_with_other_institution": {
19+
"en": "Sign in using other institution",
20+
"cs": "Přihlásit se účtem jiné instituce"
21+
},
1822
"previous_selection": {
1923
"en": "your previous selection",
2024
"cs": "vaše předchozí volba"

themes/perun/perun/disco-tpl.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
Module::getModuleUrl('discopower/assets/js/suggest.js') . '"></script>';
3030

3131
$this->data['head'] .= searchScript();
32+
$this->data['head'] .= showEntriesScript();
3233

3334
const CONFIG_FILE_NAME = 'module_perun.php';
3435

@@ -126,6 +127,10 @@
126127
echo '</div>';
127128

128129
echo getOr();
130+
131+
echo '<span id="showEntries" class="btn btn-block btn-default btn-lg">' .
132+
$this->t('{perun:disco:sign_with_other_institution}') .'</span>' ;
133+
echo '<div id="entries" style="display: none">';
129134
}
130135

131136
echo showAllTaggedIdPs($this);
@@ -179,6 +184,19 @@
179184

180185
$this->includeAtTemplateBase('includes/footer.php');
181186

187+
function showEntriesScript()
188+
{
189+
$script = '<script type="text/javascript">
190+
$(document).ready(function() {
191+
$("#showEntries").click(function() {
192+
$("#entries").show();
193+
$("#showEntries").hide();
194+
});
195+
});
196+
</script>';
197+
return $script;
198+
}
199+
182200
function searchScript()
183201
{
184202

0 commit comments

Comments
 (0)