blob: 4bb163a8a8454152d8a56edb7862b4203dbfb21d (
plain)
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
|
<?php
/**
* @var Admin_IliasInterfaceController $controller
* @var string $ilias_index
* @var string $valid_url
* @var string $ilias_version
* @var string $ilias_version_date
* @var string $ldap_options
* @var array $existing_indices
* @var array $ilias_config
* @var array $ilias_clients
*/
?>
<? if (!$valid_url) : ?>
<form class="default" action="<?= $controller->url_for('admin/ilias_interface/edit_server/'.$ilias_index) ?>" method="post">
<? else : ?>
<form class="default" action="<?= $controller->url_for('admin/ilias_interface/save/'.$ilias_index) ?>" method="post">
<? endif ?>
<?= CSRFProtection::tokenTag() ?>
<? if (isset($existing_indices) && count($existing_indices) && ($ilias_index == 'new')) : ?>
<label>
<span class="required"><?= _('Art der Verknüpfung') ?></span>
<select name="ilias_index">
<option value="new" selected><?=_('Neue Verknüpfung')?></option>
<? foreach ($existing_indices as $existing_index => $data) : ?>
<option value="<?=$existing_index?>"><?=sprintf(_('ILIAS-Installation (Index %s) aus vorheriger Verknüpfung'), $existing_index)?></option>
<? endforeach ?>
</select>
</label>
<? else : ?>
<label>
<span class="required"><?= _('Kennung der Verknüpfung') ?></span>
<input type="hidden" name="ilias_index" value="<?=$ilias_index?>">
<input type="text" size="50" maxlength="255" value="<?=$ilias_index == 'new' ? _('Neue Verknüpfung') : $ilias_index?>" disabled>
</label>
<? endif ?>
<label>
<span class="required"><?= _('Name der Installation') ?></span>
<input type="text" name="ilias_name" size="50" maxlength="255" value="<?= htmlReady($ilias_config['name']) ?>" required>
</label>
<label>
<span class="required"> <?= _('URL') ?></span>
<input type="text" name="ilias_url" size="50" maxlength="255" value="<?= $ilias_config['url'] ?>" required>
</label>
<label>
<span class="required"> <?= _('HTTP Connection Timeout (in Sekunden)') ?></span>
<input type="number" name="ilias_http_connection_timeout" value="<?= $ilias_config['http_connection_timeout'] ?? 1 ?>" required>
</label>
<label>
<span class="required"> <?= _('HTTP Request Timeout (in Sekunden)') ?></span>
<input type="number" name="ilias_http_request_timeout" value="<?= $ilias_config['http_request_timeout'] ?? 3 ?>" required>
</label>
<? if ($valid_url) : ?>
<label for="ilias_version">
<span class="required"><?= _('ILIAS Version') ?></span>
<? if ($ilias_version) : ?>
<input type="hidden" name="ilias_version" value="<?=htmlReady($ilias_version)?>">
<div><?=htmlReady($ilias_version).' ('.htmlReady($ilias_version_date).')'?></div>
<? else : ?>
<input type="text" name="ilias_version" size="8" maxlength="8" value="<?=htmlReady($ilias_config['version']) ?>" required>
<? endif ?>
</label>
<? if (!empty($ilias_config['version']) && !empty($ilias_clients)) : ?>
<label>
<span class="required"> <?= _('Name des ILIAS-Mandanten') ?></span>
<? if (isset($ilias_clients) && count($ilias_clients) == 1) : ?>
<input type="hidden" name="ilias_client" value="<?=htmlReady($ilias_clients[0])?>">
<div><?=htmlReady($ilias_clients[0])?></div>
<? elseif (isset($ilias_clients) && count($ilias_clients) > 1) : ?>
<select name="ilias_client">
<? foreach ($ilias_clients as $client_name) : ?>
<option value="<?=htmlReady($client_name)?>" <?= $client_name == $ilias_config['client'] ? ' selected' : ''?>><?=htmlReady($client_name)?></option>
<? endforeach ?>
</select>
<? else : ?>
<input type="text" name="ilias_client" size="50" maxlength="255" value="<?= $ilias_config['client'] ?>" required>
<? endif ?>
</label>
<? endif ?>
<label>
<span><?= _('Externe Authentifizierung') ?></span>
<? if (!empty($ldap_options)) : ?>
<select name="ilias_ldap_enable">
<?=$ldap_options;?>
</select><br>
<?=_("Authentifizierungsplugin (nur LDAP/Shibboleth) beim Anlegen von externen Accounts übernehmen.");?>
<?=Icon::create('info-circle', Icon::ROLE_INACTIVE)->asImg(['title' => _('Wählen Sie hier ein Authentifizierungsplugin, damit neu angelegte ILIAS-Accounts den entsprechenden Authentifizierungsmodus erhalten, wenn dieser Modus auch für den vorhandenen Stud.IP-Account gilt. Andernfalls erhalten alle ILIAS-Accounts den default-Modus')]);?>
<? else : ?>
<br><?=_('(Um diese Einstellung zu nutzen, muss zumindest ein Authentifizierungsplugin aktiviert sein.)');?>
<input type="hidden" name="ilias_ldap_enable" value="">
<? endif ?>
</label>
<label>
<input type="checkbox" name="ilias_no_account_updates" value="1" <?= $ilias_config['no_account_updates'] ? 'checked' : '' ?>>
<span><?= _('Keine Accounts aus Stud.IP in ILIAS anlegen oder aktualisieren') ?></span>
</label>
<label>
<span class="required"> <?= _('Admin-Account') ?></span>
<input type="text" name="ilias_admin" size="50" maxlength="255" value="<?= $ilias_config['admin'] ?>" required>
</label>
<label>
<span class="required"> <?= _('Admin-Passwort') ?></span>
<input type="password" name="ilias_admin_pw" size="50" maxlength="255" value="<?= $ilias_config['admin_pw'] ?>" required>
</label>
<? endif ?>
<footer data-dialog-button>
<? if (!$valid_url) : ?>
<?= Studip\Button::createAccept(_('Weiter'), 'submit', ['data-dialog' => 'size=auto']) ?>
<? else : ?>
<?= Studip\Button::createAccept(_('Speichern'), 'submit') ?>
<? endif ?>
<?= Studip\Button::createCancel(_('Abbrechen'), 'cancel', ['data-dialog' => 'close']) ?>
</footer>
</form>
|