Server has been upgraded to GitLab release 13.9.6

default-header.php 3.86 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">
haemmer's avatar
haemmer committed
7
	<meta name="keywords" content="Home Organisation, Discovery Service, WAYF, Shibboleth, Login, AAI">
haemmer's avatar
haemmer committed
8
	<meta name="description" content="Choose your home organisation to authenticate">
haemmer's avatar
haemmer committed
9
	<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" />
10 11
	<script type="text/javascript" src="<?php echo $javascriptURL ?>/jquery.js"></script>
	<script type="text/javascript" src="<?php echo $javascriptURL ?>/improvedDropDown.js"></script>
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
	// Confirm permanent selection
	function showPermanentConfirmation(){
		
53 54 55
		var message = unescape('<?php echo getLocalString('permanent_cookie_note', 'js') ?>');
		message = message.replace('%s', window.location.href.replace(/\?.+/, ''));
		return alert(message);
56
	}
57
	
58 59 60 61 62 63 64 65
	// 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
66
		} else {
67 68 69 70 71
			if (document.IdPList.permanent && document.IdPList.permanent.checked){
				return showConfirmation();
			} else {
				return true;
			}
haemmer's avatar
haemmer committed
72 73
		}
	}
74 75 76 77
	
	// Init WAYF
	function init(){
		preventIframeEmbedding();
78
		
79
		setFocus();
80 81
		
		if (<?php echo ($userImprovedDropDownList) ? 'true' : 'false' ?>){
82 83 84 85
			
			var searchText = '<?php echo getLocalString('search_idp', 'js') ?>';
			$("#userIdPSelection:enabled option[value='-']").text(searchText);
			
86
			// Convert select element into improved drop down list
87
			$("#userIdPSelection:enabled").improveDropDown({
88 89 90 91 92
				iconPath:'<?php echo $imageURL ?>/drop_icon.png',
				noMatchesText: '<?php echo getLocalString('no_idp_found', 'js') ?>',
				noItemsText: '<?php echo getLocalString('no_idp_available', 'js') ?>'
			});
		}
93 94
	}
	
haemmer's avatar
haemmer committed
95
	// Call init function when DOM is ready
haemmer's avatar
haemmer committed
96
	$(document).ready(init);
97 98 99 100 101
	
	-->
	</script>
	<style type="text/css">
	<!--
haemmer's avatar
haemmer committed
102
	<?php printCSS() ?>
103 104 105
	-->
	</style>
</head>
106

107
<body>
108

haemmer's avatar
haemmer committed
109
<div id="container">
haemmer's avatar
haemmer committed
110
	<div class="box">
haemmer's avatar
haemmer committed
111 112 113
		<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>
114
		</div>
haemmer's avatar
haemmer committed
115 116 117 118 119 120 121
			<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
122
<!-- Body: Start -->