Enhances config file edit form
parent
b67a915ebe
commit
e1265500cf
|
@ -60,7 +60,18 @@ function editConfig($configPart, $indent, $platform=false, $parent='') {
|
||||||
// if it's not array, just display it
|
// if it's not array, just display it
|
||||||
?>
|
?>
|
||||||
<div class="col-md-8 text-start">
|
<div class="col-md-8 text-start">
|
||||||
<input class="form-control" type="text" name="<?= htmlspecialchars($config_item) ?>" value="<?= htmlspecialchars($config_value ?? '') ?>" required autofocus />
|
<?php if ($config_item === 'registration_enabled') { ?>
|
||||||
|
<input class="form-check-input" type="checkbox" role="switch" name="<?= htmlspecialchars($config_item) ?>" value="<?= htmlspecialchars($config_value ?? 0) ?>" <?= ($config_value === 1 || $config_value === true) ? 'checked' : '' ?> />
|
||||||
|
<?php } elseif ($config_item === 'environment') { ?>
|
||||||
|
<select class="form-control" type="text" name="<?= htmlspecialchars($config_item) ?>">
|
||||||
|
<option value="development"<?= ($config_value === 'development') ? ' selected' : '' ?>>development</option>
|
||||||
|
<option value="production"<?= ($config_value === 'production') ? ' selected' : '' ?>>production</option>
|
||||||
|
</select>
|
||||||
|
<?php } elseif ($config_item === 'version') {?>
|
||||||
|
<input class="form-control" type="text" name="<?= htmlspecialchars($config_item) ?>" value="<?= htmlspecialchars($config_value ?? '') ?>" disabled />
|
||||||
|
<?php } else { ?>
|
||||||
|
<input class="form-control" type="text" name="<?= htmlspecialchars($config_item) ?>" value="<?= htmlspecialchars($config_value ?? '') ?>" />
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue