ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
selectidp-links.php
Go to the documentation of this file.
1 <?php
2 
3 if (!array_key_exists('header', $this->data)) {
4  $this->data['header'] = 'selectidp';
5 }
6 $this->data['header'] = $this->t($this->data['header']);
7 $this->data['autofocus'] = 'preferredidp';
8 $this->includeAtTemplateBase('includes/header.php');
9 foreach ($this->data['idplist'] as $idpentry) {
10  if (isset($idpentry['name'])) {
11  $this->getTranslator()->includeInlineTranslation('idpname_'.$idpentry['entityid'], $idpentry['name']);
12  } elseif (isset($idpentry['OrganizationDisplayName'])) {
13  $this->getTranslator()->includeInlineTranslation(
14  'idpname_'.$idpentry['entityid'],
15  $idpentry['OrganizationDisplayName']
16  );
17  }
18  if (isset($idpentry['description'])) {
19  $this->getTranslator()->includeInlineTranslation('idpdesc_'.$idpentry['entityid'], $idpentry['description']);
20  }
21 }
22 ?>
23  <h2><?php echo $this->data['header']; ?></h2>
24  <form method="get" action="<?php echo $this->data['urlpattern']; ?>">
25  <input type="hidden" name="entityID" value="<?php echo htmlspecialchars($this->data['entityID']); ?>"/>
26  <input type="hidden" name="return" value="<?php echo htmlspecialchars($this->data['return']); ?>"/>
27  <input type="hidden" name="returnIDParam"
28  value="<?php echo htmlspecialchars($this->data['returnIDParam']); ?>"/>
29  <p><?php
30  echo $this->t('selectidp_full');
31  if ($this->data['rememberenabled']) {
32  echo '<br /><input type="checkbox" name="remember" value="1" title="'.$this->t('remember').'" />'.
33  $this->t('remember');
34  }
35  ?></p>
36 <?php
37  if (!empty($this->data['preferredidp']) &&
38  array_key_exists($this->data['preferredidp'], $this->data['idplist'])
39  ) {
40  $idpentry = $this->data['idplist'][$this->data['preferredidp']];
41  echo '<div class="preferredidp">';
42  echo ' <img src="/'.$this->data['baseurlpath'].
43  'resources/icons/experience/gtk-about.64x64.png" class="float-r" alt="'.
44  $this->t('icon_prefered_idp').'" />';
45 
46  if (array_key_exists('icon', $idpentry) && $idpentry['icon'] !== null) {
47  $iconUrl = \SimpleSAML\Utils\HTTP::resolveURL($idpentry['icon']);
48  echo '<img class="float-l" style="margin: 1em; padding: 3px; border: 1px solid #999" src="'.
49  htmlspecialchars($iconUrl).'" />';
50  }
51  echo "\n".' <h3 style="margin-top: 8px">'.
52  htmlspecialchars($this->t('idpname_'.$idpentry['entityid'])).'</h3>';
53 
54  if (!empty($idpentry['description'])) {
55  echo ' <p>'.htmlspecialchars($this->t('idpdesc_'.$idpentry['entityid'])).'<br />';
56  }
57  echo('<button id="preferredidp" type="submit" class="btn" name="idp_'.
58  htmlspecialchars($idpentry['entityid']).'">'.
59  $this->t('select').'</button></p>');
60  echo '</div>';
61  }
62 
63  foreach ($this->data['idplist'] as $idpentry) {
64  if ($idpentry['entityid'] != $this->data['preferredidp']) {
65  if (array_key_exists('icon', $idpentry) && $idpentry['icon'] !== null) {
66  $iconUrl = \SimpleSAML\Utils\HTTP::resolveURL($idpentry['icon']);
67  echo '<img class="float-l" style="clear: both; margin: 1em; padding: 3px; border: 1px solid #999"'.
68  ' src="'.htmlspecialchars($iconUrl).'" />';
69  }
70  echo "\n".' <h3 style="margin-top: 8px">'.htmlspecialchars($this->t('idpname_'.$idpentry['entityid']));
71  echo '</h3>';
72 
73  if (!empty($idpentry['description'])) {
74  echo ' <p>'.htmlspecialchars($this->t('idpdesc_'.$idpentry['entityid'])).'<br />';
75  }
76  echo '<button type="submit" class="btn" name="idp_'.htmlspecialchars($idpentry['entityid']).'">'.
77  $this->t('select').'</button></p>';
78  }
79  }
80 ?>
81  </form>
82 <?php $this->includeAtTemplateBase('includes/footer.php');
static resolveURL($url, $base=null)
Resolve a (possibly relative) URL relative to a given base URL.
Definition: HTTP.php:1023
input
Definition: langcheck.php:166