ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
selectidp-dropdown.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'] = 'dropdownlist';
8 $this->includeAtTemplateBase('includes/header.php');
9 
10 foreach ($this->data['idplist'] as $idpentry) {
11  if (!empty($idpentry['name'])) {
12  $this->getTranslator()->includeInlineTranslation(
13  'idpname_'.$idpentry['entityid'],
14  $idpentry['name']
15  );
16  } elseif (!empty($idpentry['OrganizationDisplayName'])) {
17  $this->getTranslator()->includeInlineTranslation(
18  'idpname_'.$idpentry['entityid'],
19  $idpentry['OrganizationDisplayName']
20  );
21  }
22  if (!empty($idpentry['description'])) {
23  $this->getTranslator()->includeInlineTranslation('idpdesc_'.$idpentry['entityid'], $idpentry['description']);
24  }
25 }
26 ?>
27  <h2><?php echo $this->data['header']; ?></h2>
28  <p><?php echo $this->t('selectidp_full'); ?></p>
29  <form method="get" action="<?php echo $this->data['urlpattern']; ?>">
30  <input type="hidden" name="entityID" value="<?php echo htmlspecialchars($this->data['entityID']); ?>"/>
31  <input type="hidden" name="return" value="<?php echo htmlspecialchars($this->data['return']); ?>"/>
32  <input type="hidden" name="returnIDParam"
33  value="<?php echo htmlspecialchars($this->data['returnIDParam']); ?>"/>
34  <select id="dropdownlist" name="idpentityid">
35  <?php
36  usort($this->data['idplist'], function ($idpentry1, $idpentry2) {
37  return strcmp(
38  $this->t('idpname_'.$idpentry1['entityid']),
39  $this->t('idpname_'.$idpentry2['entityid'])
40  );
41  });
42 
43  foreach ($this->data['idplist'] as $idpentry) {
44  echo '<option value="'.htmlspecialchars($idpentry['entityid']).'"';
45  if (isset($this->data['preferredidp']) && $idpentry['entityid'] == $this->data['preferredidp']) {
46  echo ' selected="selected"';
47  }
48  echo '>'.htmlspecialchars($this->t('idpname_'.$idpentry['entityid'])).'</option>';
49  }
50  ?>
51  </select>
52  <button class="btn" type="submit"><?php echo $this->t('select'); ?></button>
53  <?php
54  if ($this->data['rememberenabled']) {
55  echo('<br/><input type="checkbox" name="remember" value="1" />'.$this->t('remember'));
56  }
57  ?>
58  </form>
59 <?php $this->includeAtTemplateBase('includes/footer.php');
if(!array_key_exists('header', $this->data)) $this data['header']
input
Definition: langcheck.php:166
select
Definition: langcheck.php:166