Newer
Older
Andreas Åkre Solberg
committed
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php
if(!array_key_exists('header', $this->data)) {
$this->data['header'] = 'selectidp';
}
$this->data['header'] = $this->t($this->data['header']);
$this->data['head'] = '<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery.js"></script>';
$this->data['head'] .= '<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-ui.js"></script>';
$this->data['head'] .= '<link rel="stylesheet" media="screen" type="text/css" href="/' . $this->data['baseurlpath'] . 'resources/uitheme/jquery-ui-themeroller.css" />';
$this->data['head'] .= '<script type="text/javascript">
$(document).ready(function() {
$("#discotabs > ul").tabs({ selected: ' . $this->data['defaulttab'] . ' });
/*
$("#foodledescr").resizable({
handles: "all"
});
*/
});
</script>';
$this->data['autofocus'] = 'preferredidp';
$this->includeAtTemplateBase('includes/header.php');
foreach ($this->data['idplist'] AS $slist) {
foreach ($slist AS $idpentry) {
if (isset($idpentry['name']))
$this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['name']);
if (isset($idpentry['description']))
$this->includeInlineTranslation('idpdesc_' . $idpentry['entityid'], $idpentry['description']);
}
}
?>
<h2><?php echo $this->data['header']; ?></h2>
<form method="get" action="<?php echo $this->data['urlpattern']; ?>">
<input type="hidden" name="entityID" value="<?php echo htmlspecialchars($this->data['entityID']); ?>" />
<input type="hidden" name="return" value="<?php echo htmlspecialchars($this->data['return']); ?>" />
<input type="hidden" name="returnIDParam" value="<?php echo htmlspecialchars($this->data['returnIDParam']); ?>" />
<p><?php
$checked = '';
if ($this->data['rememberchecked']) {
$checked = ' checked="checked"';
}
echo $this->t('selectidp_full');
if($this->data['rememberenabled']) {
echo('<br /><input type="checkbox"' . $checked . ' name="remember" value="1" /> ' . $this->t('remember'));
}
?></p>
<div id="discotabs">
<ul>
<?php
$tabs = array_keys( $this->data['idplist']);
foreach ($tabs AS $tab) {
echo '<li><a href="#' . $tab . '"><span>' . $this->t('{discopower:tabs:' . $tab . '}') . '</span></a></li> ';
}
?>
</ul>
<?php
foreach( $this->data['idplist'] AS $tab => $slist) {
echo '<div id="' . $tab . '">';
if (!empty($this->data['preferredidp']) && array_key_exists($this->data['preferredidp'], $slist)) {
$idpentry = $slist[$this->data['preferredidp']];
echo '<div class="preferredidp">';
echo ' <img src="/' . $this->data['baseurlpath'] .'resources/icons/star.png" style="float: right" />';
if(array_key_exists('icon', $idpentry) && $idpentry['icon'] !== NULL) {
$iconUrl = SimpleSAML_Utilities::resolveURL($idpentry['icon']);
echo '<img style="float: left; margin: 1em; padding: 3px; border: 1px solid #999" src="' . htmlspecialchars($iconUrl) . '" />';
}
echo '<h3 style="margin-top: 8px">' . htmlspecialchars($this->t('idpname_' . $idpentry['entityid'])) . '</h3>';
if (!empty($idpentry['description'])) {
echo ' <p>' . htmlspecialchars($this->t('idpdesc_' . $idpentry['entityid'])) . '<br />';
}
echo('<input id="preferredidp" type="submit" name="idp_' .
htmlspecialchars($idpentry['entityid']) . '" value="' .
$this->t('select') . '" /></p>');
echo '</div>';
}
foreach ($slist AS $idpentry) {
if ($idpentry['entityid'] != $this->data['preferredidp']) {
if(array_key_exists('icon', $idpentry) && $idpentry['icon'] !== NULL) {
$iconUrl = SimpleSAML_Utilities::resolveURL($idpentry['icon']);
echo '<img style="clear: both; float: left; margin: 1em; padding: 3px; border: 1px solid #999" src="' . htmlspecialchars($iconUrl) . '" />';
}
echo ' <h3 style="margin-top: 8px">' . htmlspecialchars($this->t('idpname_' . $idpentry['entityid'])) . '</h3>';
if (!empty($idpentry['description'])) {
echo ' <p>' . htmlspecialchars($this->t('idpdesc_' . $idpentry['entityid'])) . '<br />';
}
echo('<input id="preferredidp" type="submit" name="idp_' .
htmlspecialchars($idpentry['entityid']) . '" value="' .
$this->t('select') . '" /></p>');
}
}
echo '</div>';
}
?>
</div>
</form>
<?php $this->includeAtTemplateBase('includes/footer.php'); ?>