default-header.php 4.01 KB
Newer Older
haemmer's avatar
haemmer committed
1
<?php // Copyright (c) 2011, SWITCH - Serving Swiss Universities ?>
haemmer's avatar
haemmer committed
2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
4
<html>
<head>
haemmer's avatar
haemmer committed
5
6
	<title><?php echo getLocalString('title') ?></title> 
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
7
8
	<meta name="keywords" content="Discovery Service, WAYF, Shibboleth">
	<meta name="description" content="Choose your home organization to authenticate">
9
10
11
	<script type="text/javascript" src="<?php echo $javascriptURL ?>/jquery.js"></script>
	<script type="text/javascript" src="<?php echo $javascriptURL ?>/improvedDropDown.js"></script>
	<link rel="StyleSheet" href="<?php echo $cssURL ?>/improvedDropdown.css" type="text/css">
12
13
14
15
16
17
18
19
	<script language="JavaScript" type="text/javascript">
	<!--
	
	// Prevent that WAYF is loaded in an IFRAME
	function preventIframeEmbedding(){
		if (top != self) {
			top.location = self.location;
		}
haemmer's avatar
haemmer committed
20
21
	}
	
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
	// 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();
		}
haemmer's avatar
haemmer committed
42
43
	}
	
44
45
46
47
	// Confirm action
	function showConfirmation(){
		
		return confirm(unescape('<?php echo getLocalString('confirm_permanent_selection', 'js') ?>'));
haemmer's avatar
haemmer committed
48
49
	}
	
50
51
52
53
54
	// Confirm permanent selection
	function showPermanentConfirmation(){
		
		return alert(unescape('<?php echo getLocalString('permanent_cookie_note', 'js') ?>'));
	}
55
	
56
57
58
59
60
61
62
63
	// 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;
haemmer's avatar
haemmer committed
64
		} else {
65
66
67
68
69
			if (document.IdPList.permanent && document.IdPList.permanent.checked){
				return showConfirmation();
			} else {
				return true;
			}
haemmer's avatar
haemmer committed
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
	
	//Setup the dom ready event
	function DomReady(func){
		if(document.addEventListener){
			//W3C
			document.addEventListener("DOMContentLoaded", func, false);
		} else {
			//IE
			document.onreadystatechange = function(){readyState(func)}
		}
	}
	
	//IE ready execution function
	function readyState(func){
		//dom is ready for interaction
		if(document.readyState == "interactive"){
			func();
		}
	}
	
	// Init WAYF
	function init(){
		preventIframeEmbedding();
95
		
96
		setFocus();
97
98
99
100
101
102
103
104
105
		
		if (<?php echo ($userImprovedDropDownList) ? 'true' : 'false' ?>){
			// Convert select element into improved drop down list
			$("#userIdPSelection").improveDropDown({
				iconPath:'<?php echo $imageURL ?>/drop_icon.png',
				noMatchesText: '<?php echo getLocalString('no_idp_found', 'js') ?>',
				noItemsText: '<?php echo getLocalString('no_idp_available', 'js') ?>'
			});
		}
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
	}
	
	// Add new DomReady function
	window.onDomReady = DomReady;
	
	// Attach init function
	window.onDomReady(init);
	
	-->
	</script>
	<style type="text/css">
	<!--
	<? printCSS() ?>
	-->
	</style>
</head>
122

123
<body>
124

haemmer's avatar
haemmer committed
125
<div id="container">
haemmer's avatar
haemmer committed
126
	<div class="box">
haemmer's avatar
haemmer committed
127
128
129
		<div id="header">
			<a href="http://www.switch.ch/aai"><img src="<?php echo $logoURL ?>" alt="SWITCHaai" id="federationLogo"></a>
			<a href="http://www.switch.ch/"><img src="<?php echo $imageURL ?>/switch-logo.png" alt="SWITCH" id="organisationLogo"></a>
130
		</div>
haemmer's avatar
haemmer committed
131
132
133
134
135
136
137
			<div id="content">
				<ul class="menu">
				  <li><a href="http://www.switch.ch/<?php echo $language ?>/aai/about/"><?php echo getLocalString('about_federation'); ?></a></li>
				  <li class="last"><a href="http://www.switch.ch/<?php echo $language ?>/aai/faq/"><?php echo getLocalString('faq') ?></a></li>
				  <li class="last"><a href="http://www.switch.ch/<?php echo $language ?>/aai/help/"><?php echo getLocalString('help') ?></a></li>
				  <li class="last"><a href="http://www.switch.ch/<?php echo $language ?>/aai/privacy/"><?php echo getLocalString('privacy') ?></a></li>
				</ul>
haemmer's avatar
haemmer committed
138
<!-- Body: Start -->