Skip to content
Snippets Groups Projects
Commit 7e441a9b authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Improvements to iFrame SLO: support for translation of SP names, changed time...

Improvements to iFrame SLO: support for translation of SP names, changed time delay for demo and improved CSS

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@835 44740490-163a-0410-bde0-09ae8108e29a
parent 7fa39aaa
No related branches found
No related tags found
No related merge requests found
......@@ -24,21 +24,21 @@ for (j=1; j<=10; j++) {
<p>You have initiated a <strong>global logout</strong> from the service <strong><?php echo $this->data['requesterName']; ?></strong>. Global logout means you will be logged out from all services connected to this identity provider. This page will show the status of the logout proccess for all of the services you are logged into.</p>
<?php
foreach ($this->data['sparray'] AS $sp) {
echo '<iframe class="hiddeniframe" style="border: 1px solid #888; width: 80%; height: 100px" src="' . $sp['url'] . '" ></iframe>';
}
foreach ($this->data['sparray'] AS $spentityid => $sp) {
$spname = is_array($sp['name']) ? $this->getTranslation($sp['name']) : $sp['name'];
echo '<div class="inprogress" id="' . $spentityid . '">
<img style="float: left; margin: 3px" src="/' . $this->data['baseurlpath'] . 'resources/progress.gif" />Wait... is logging out from <strong>' . $sp['name'] . '</strong></div>';
<img style="float: left; margin: 3px" src="/' . $this->data['baseurlpath'] . 'resources/progress.gif" />Wait... is logging out from <strong>' . $spname . '</strong></div>';
}
?>
<div id="interrupt">[ <a href="<?php echo $this->data['logoutresponse']; ?>">Interrupt logging out and go back to service</a> ]</div>
......@@ -49,8 +49,5 @@ for (j=1; j<=10; j++) {
<br />[ <a href="<?php echo $this->data['logoutresponse']; ?>">OK, continue back to <?php echo $this->data['requesterName']; ?> to complete the logout process.</a> ]
</div>
</div>
<?php $this->includeAtTemplateBase('includes/footer.php'); ?>
\ No newline at end of file
......@@ -273,14 +273,14 @@ div#interrupt {
border: 3px solid #036;
background: #39F;
padding: 1em;
margin: 1em;
margin: .2em;
}
div#iscompleted {
display: none;
border: 3px solid #993;
background: #FF9;
padding: 1em;
margin: 1em;
margin: .2em;
}
div.allcompleted#iscompleted {
display: block ! important;
......@@ -289,8 +289,8 @@ div.inprogress, div.loggedout {
background: #eee;
color: #444;
padding: 1em;
margin: 1em;
padding: .2em 1em;
margin: .2em;
}
div.inprogress {
border: 1px dotted #888;
......
......@@ -100,6 +100,9 @@ function updateslostatus() {
$listofsps = $session->get_sp_list(SimpleSAML_Session::STATE_LOGGEDOUT);
// Using template object to be able to translate name of service provider.
$t = new SimpleSAML_XHTML_Template($config, 'logout-iframe.php');
// Instantiate the xajaxResponse object
$objResponse = new xajaxResponse();
......@@ -111,10 +114,11 @@ function updateslostatus() {
$spmetadata = $metadata->getMetaData($spentityid, 'saml20-sp-remote');
$name = array_key_exists('name', $spmetadata) ? $spmetadata['name'] : $spentityid;
$spname = is_array($name) ? $t->getTranslation($name) : $name;
$objResponse->addAssign($spentityid, "className", 'loggedout');
$objResponse->addAssign($spentityid, "innerHTML", 'Logging out from <strong>' . $name . '</strong> successfully completed');
$objResponse->addAssign($spentityid, "innerHTML", 'Logging out from <strong>' . $spname . '</strong> successfully completed');
}
......
......@@ -13,7 +13,7 @@ require_once('../../_include.php');
sleep(rand(1,6));
sleep(max(0, rand(-3,5)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment