aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-06 09:21:07 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2024-05-06 09:21:07 +0000
commite2df6525b5b19f2ead4967630c437b89558afcf3 (patch)
treeca66753c52a488fd65e4685ba506511534ae44da /app
parent06629e19ca03c3431a64302a18a1ff2a2f011be1 (diff)
allow setting configuration by environment variables, fixes #3560
Closes #3560 Merge request studip/studip!2875
Diffstat (limited to 'app')
-rw-r--r--app/views/admin/configuration/table-row.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/app/views/admin/configuration/table-row.php b/app/views/admin/configuration/table-row.php
index 12769ed..a0725a5 100644
--- a/app/views/admin/configuration/table-row.php
+++ b/app/views/admin/configuration/table-row.php
@@ -9,12 +9,16 @@
?>
<tr id="field-<?= htmlReady($field) ?>">
<td>
+ <? if (!Config::get()->fromEnv($field)): ?>
<a data-dialog href="<?= $controller->link_for($linkchunk, compact('field')) ?>">
<?= htmlReady($field) ?>
</a>
- <? if (!empty($description)): ?>
- <br><small><?= htmlReady($description) ?></small>
- <? endif; ?>
+ <? else: ?>
+ <?= htmlReady($field) ?>
+ <? endif; ?>
+ <? if (!empty($description)): ?>
+ <br><small><?= htmlReady($description) ?></small>
+ <? endif; ?>
</td>
<td class="wrap-content">
<? if ($type === 'string' || $type === 'i18n'): ?>
@@ -31,8 +35,14 @@
</td>
<td><?= htmlReady($type) ?></td>
<td class="actions">
+ <? if (!Config::get()->fromEnv($field)): ?>
<a data-dialog="size=auto" href="<?= $controller->link_for($linkchunk, compact('field')) ?>">
<?= Icon::create('edit')->asImg(['title' => _('Konfigurationsparameter bearbeiten')]) ?>
</a>
+ <? else: ?>
+ <?= Icon::create('ufo', Icon::ROLE_INFO)->asImg([
+ 'title' => _('Wert wurde über eine Umgebungsvariable gesetzt und kann an dieser Stelle nicht verändert werden.'),
+ ]) ?>
+ <? endif; ?>
</td>
</tr>