Nofu/template/default/settings.php
2024-09-12 16:21:52 +02:00

59 lines
2.1 KiB
PHP

<?php
use Utils\CsrfToken;
use Utils\Select;
use Utils\Debug;
$error = null;
$breadcrumbs = ' / Settings';
require 'header.php';
require 'titleBar.php';
?>
<form action="index.php" class="login" method="post">
<div class="alert" style="color: red;">
<?= $error; ?>
</div>
<label for="title">Title</label>
<input type="text" name="title" id="title" value="<?= $config['title']; ?>">
<label for="desc">Description (meta tag)</label>
<input type="text" name="desc" id="desc" value="<?= $config['desc']; ?>">
<label for="visibility">Visibility</label>
<select name="visibility" id="visibility">
<option value="private" <?= Select::isSelected('private', $config['visibility']); ?>>Private</option>
<option value="public" <?= Select::isSelected('public', $config['visibility']); ?>>Public</option>
</select>
<label for="colorScheme">Color scheme</label>
<select name="colorScheme" id="colorScheme">
<option value="auto" <?= Select::isSelected('auto', $config['colorScheme']); ?>>Auto</option>
<option value="light" <?= Select::isSelected('light', $config['colorScheme']); ?>>Light</option>
<option value="dark" <?= Select::isSelected('dark', $config['colorScheme']); ?>>Dark</option>
</select>
<label for="view">View</label>
<select name="view" id="view">
<option value="full" <?= Select::isSelected('full', $config['view']); ?>>Full</option>
<option value="compact" <?= Select::isSelected('compact', $config['view']); ?>>Compact</option>
<option value="icons" <?= Select::isSelected('icons', $config['view']); ?>>Icons</option>
</select>
<p class="checkbox">
<label for="reimport">Reimport images and user files</label>
<input type="checkbox" name="reimport" id="reimport" value="1" />
</p>
<input type="hidden" name="token" value="<?= CsrfToken::generateToken(); ?>">
<input type="hidden" name="settings" value="1" />
<div class="flex">
<a class="button" href="?">Cancel</a>
<button type="submit">Save</button>
</div>
</form>
<?php
require('footer.php');