forked from EsupPortail/esup-wayf
-
Notifications
You must be signed in to change notification settings - Fork 1
/
default-header.php
executable file
·113 lines (100 loc) · 3.84 KB
/
default-header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php // Copyright (c) 2014, SWITCH ?>
<!DOCTYPE HTML>
<html>
<head>
<title><?php echo getLocalString('title') ?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="keywords" content="Home Organisation, Discovery Service, WAYF, Shibboleth, Login, AAI">
<meta name="description" content="Choose your home organisation to authenticate">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="<?php echo $_SERVER['SCRIPT_NAME'] ?>/styles.css" type="text/css">
<link rel="stylesheet" href="<?php echo $_SERVER['SCRIPT_NAME'] ?>/ImprovedDropDown.css" type="text/css">
<script type="text/javascript" src="<?php echo $javascriptURL ?>/jquery.js"></script>
<script type="text/javascript" src="<?php echo $javascriptURL ?>/improvedDropDown.js"></script>
<script type="text/javascript">
<!--
// Prevent that WAYF is loaded in an IFRAME
function preventIframeEmbedding(){
if (top != self) {
top.location = self.location;
}
}
// Set focus to submit button or drop down list
function setFocus(){
// Skip this if we cannot access the form elements
if (
!document.IdPList ||
!document.IdPList.Select
){
return;
}
if (
document.IdPList.user_idp &&
document.IdPList.user_idp.selectedIndex == 0
){
// Set focus to select
document.IdPList.user_idp.focus();
} else {
// Set focus to submit button
document.IdPList.Select.focus();
}
}
// Perform input validation on WAYF form
function checkForm(){
if(
document.IdPList.user_idp &&
document.IdPList.user_idp.selectedIndex == 0
){
alert(unescape('<?php echo getLocalString('make_selection', 'js') ?>'));
return false;
} else {
return true;
}
}
// Init WAYF
function init(){
preventIframeEmbedding();
setFocus();
if (<?php echo ($useImprovedDropDownList) ? 'true' : 'false' ?>){
var searchText = '<?php echo getLocalString('search_idp', 'js') ?>';
$("#userIdPSelection:enabled option[value='-']").text(searchText);
// Convert select element into improved drop down list
$("#userIdPSelection:enabled").improveDropDown({
iconPath:'<?php echo $imageURL ?>/drop_icon.png',
noMatchesText: '<?php echo getLocalString('no_idp_found', 'js') ?>',
noItemsText: '<?php echo getLocalString('no_idp_available', 'js') ?>'
});
}
}
// Call init function when DOM is ready
$(document).ready(init);
-->
</script>
</head>
<body>
<div id="container">
<div class="box">
<div id="header">
<?php if (!empty($logoURL)) { ?>
<a href="<?php echo sprintf($federationURL, $language) ?>"><img src="<?php echo $logoURL ?>" alt="Federation Logo" id="federationLogo"></a>
<?php } ?>
<?php if (!empty($organizationLogoURL)) { ?>
<a href="<?php echo sprintf($organizationURL, $language) ?>"><img src="<?php echo $organizationLogoURL ?>" alt="Organization Logo" id="organisationLogo"></a>
<?php } ?>
</div>
<div id="content">
<ul class="menu">
<?php if (!empty($federationURL) && getLocalString('about_federation') != '') { ?>
<li><a href="<?php echo sprintf($federationURL, $language) ?>"><?php echo getLocalString('about_federation'); ?></a></li>
<?php } ?>
<?php if (!empty($faqURL) && getLocalString('faq') != '') { ?>
<li class="last"><a href="<?php echo sprintf($faqURL, $language) ?>"><?php echo getLocalString('faq') ?></a></li>
<?php } ?>
<?php if (!empty($helpURL) && getLocalString('help') != '') { ?>
<li class="last"><a href="<?php echo sprintf($helpURL, $language) ?>"><?php echo getLocalString('help') ?></a></li>
<?php } ?>
<?php if (!empty($privacyURL) && getLocalString('privacy') != '') { ?>
<li class="last"><a href="<?php echo sprintf($privacyURL, $language) ?>"><?php echo getLocalString('privacy') ?></a></li>
<?php } ?>
</ul>
<!-- Body: Start -->