aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/configuration
diff options
context:
space:
mode:
authorPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
committerPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
commit4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch)
tree5c07151ae61276d334e88f6309c30d439a85c12e /app/views/admin/configuration
parentda0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff)
parent97a188592c679890a25c37ab78463add76a52ff7 (diff)
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'app/views/admin/configuration')
-rw-r--r--app/views/admin/configuration/table-row.php16
-rw-r--r--app/views/admin/configuration/type-edit.php2
2 files changed, 14 insertions, 4 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>
diff --git a/app/views/admin/configuration/type-edit.php b/app/views/admin/configuration/type-edit.php
index 9fddb45..1cec3f0 100644
--- a/app/views/admin/configuration/type-edit.php
+++ b/app/views/admin/configuration/type-edit.php
@@ -16,7 +16,7 @@
<input name="value" type="number" id="item-value"
value="<?= htmlReady($value) ?>">
<? elseif ($type === 'array') : ?>
- <?php $v = version_compare(PHP_VERSION, '5.4.0', '>=') ? json_encode($value, JSON_UNESCAPED_UNICODE) : json_encode($value) ?>
+ <?php $v = json_encode($value, JSON_UNESCAPED_UNICODE) ?>
<textarea cols="80" rows="5" name="value" id="item-value"><?= htmlReady($v, true, true) ?></textarea>
<? elseif ($type === 'i18n'): ?>
<?= I18N::textarea('value', $value, [