|
23 | 23 | $faventry = $slist[$this->data['preferredidp']]; |
24 | 24 | } |
25 | 25 |
|
26 | | - |
27 | | -if(!array_key_exists('header', $this->data)) { |
28 | | - $this->data['header'] = 'selectidp'; |
29 | | -} |
| 26 | +$this->data['header'] = $this->t('selectidp'); |
30 | 27 | $this->data['header'] = $this->t($this->data['header']); |
31 | | -$this->data['jquery'] = array('core' => TRUE, 'ui' => TRUE, 'css' => TRUE); |
32 | | - |
33 | | - |
34 | | -$this->data['head'] = '<script type="text/javascript" src="' . SimpleSAML\Module::getModuleUrl('discopower/assets/js/jquery.livesearch.js') . '"></script>'; |
35 | | -$this->data['head'] .= '<script type="text/javascript" src="' . SimpleSAML\Module::getModuleUrl('discopower/assets/js/' . $this->data['score'] . '.js') . '"></script>'; |
36 | | - |
37 | | -$this->data['head'] .= '<script type="text/javascript"> |
38 | | -
|
39 | | - $(document).ready(function() {'; |
40 | | - $i = 0; |
41 | | - foreach ($this->data['idplist'] AS $tab => $slist) { |
42 | | - if ($tab == 'idps_in_searchable_list') { |
43 | | - $this->data['head'] .= "\n" . '$("#query_' . $tab . '").liveUpdate("#list_' . $tab . '")' . |
44 | | - (($i++ == 0) && (empty($faventry)) ? '.focus()' : '') . ';'; |
45 | | - } |
46 | | - |
| 28 | +$this->data['jquery'] = ['core' => true, 'ui' => true, 'css' => true]; |
47 | 29 |
|
48 | | - } |
49 | 30 |
|
50 | | - $this->data['head'] .= ' |
51 | | -}); |
| 31 | +$this->data['head'] = '<script type="text/javascript" src="'. |
| 32 | + SimpleSAML\Module::getModuleURL('discopower/assets/js/jquery.livesearch.js').'"></script>'."\n"; |
| 33 | +$this->data['head'] .= '<script type="text/javascript" src="'. |
| 34 | + SimpleSAML\Module::getModuleURL('discopower/assets/js/' . $this->data['score'].'.js') . '"></script>'."\n"; |
52 | 35 |
|
53 | | -</script>'; |
| 36 | +$this->data['head'] .= $this->data['search']; |
54 | 37 |
|
55 | 38 | if (!empty($faventry)) $this->data['autofocus'] = 'favouritesubmit'; |
56 | 39 |
|
@@ -230,7 +213,4 @@ function getTranslatedName($t, $metadata) { |
230 | 213 | ?> |
231 | 214 |
|
232 | 215 |
|
233 | | - |
234 | | - |
235 | | - |
236 | 216 | <?php $this->includeAtTemplateBase('includes/footer.php'); |
0 commit comments