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
|
<?
use Studip\Button, Studip\LinkButton;
// Datenfelder für Rollen in Einrichtungen ausgeben
// Default-Daten der Einrichtung
$entries = (array)DataFieldEntry::getDataFieldEntries([$user->user_id, $inst_id], 'userinstrole')
?>
<form action="<?= $controller->url_for('settings/statusgruppen/store/institute', $inst_id) ?>" method="post"
class="default">
<?= CSRFProtection::tokenTag() ?>
<input type="hidden" name="name" value="<?= htmlReady($institute['name']) ?>">
<label>
<?= _('Status') ?>
<? if ($GLOBALS['perm']->have_studip_perm('admin', $inst_id) && $institute['inst_perms'] != 'admin' && !$locked): ?>
<select name="status">
<? foreach ($user->getInstitutePerms() as $cur_status): ?>
<option <? if ($cur_status == $institute['inst_perms']) echo 'selected'; ?>><?= $cur_status ?></option>
<? endforeach; ?>
</select>
<? else: ?>
<?= ucfirst($institute['inst_perms']) ?>
<? endif; ?>
</label>
<label>
<?= _('Raum') ?>
<?= I18N::input('raum', $institute['raum'],
['id' => 'raum', 'disabled' => $locked]) ?>
</label>
<label>
<?= _('Sprechzeit') ?>
<?= I18N::input('sprech', $institute['sprechzeiten'],
['id' => 'sprech', 'disabled' => $locked]) ?>
</label>
<label>
<?= _('Telefon') ?>
<?= I18N::input('tel', $institute['telefon'],
['id' => 'telefon', 'disabled' => $locked]) ?>
</label>
<label>
<?= _('Fax') ?>
<?= I18N::input('fax', $institute['fax'],
['id' => 'fax', 'disabled' => $locked]) ?>
</label>
<? foreach ($entries as $id => $entry): ?>
<? if (!$entry->isEditable() || $locked): ?>
<label>
<?= $entry->getName() ?>
<?= $entry->getDisplayValue() ?>
</label>
<? else: ?>
<?= $entry->getHTML('datafields') ?>
<? endif; ?>
<? endforeach; ?>
<label>
<? if ($institute['externdefault']) : ?>
<?= Icon::create('accept', 'inactive')->asImg(['class' => 'text-top']); ?>
<input type="hidden" name="default_institute" value="1">
<? else : ?>
<input type="checkbox" id="default_institute" name="default_institute" value="1"
<? if ($institute['externdefault']) echo 'checked'; ?>>
<? endif; ?>
<?= _('Standard-Adresse') ?>
<?= tooltipIcon(_('Angaben, die im Adressbuch und auf den externen '
. 'Seiten als Standard benutzt werden.')) ?>
</label>
<label>
<input type="checkbox" name="invisible" id="invisible" value="1"
<? if ($institute['visible'] != 1) echo 'checked'; ?>>
<?= _('Einrichtung nicht auf der Profilseite'); ?>
<?= tooltipIcon(_('Die Angaben zu dieser Einrichtung werden nicht '
. 'auf Ihrer Profilseite und in Adressbüchern ausgegeben.')) ?>
</label>
<footer>
<?= Button::createAccept(_('Änderungen speichern'), 'speichern') ?>
</footer>
</form>
|