- handleMediaList() now scans content/ recursively for all media files
- URLs use /-media/ prefix mapping directly to content/ (no special cases)
- index.php: added /-media/ route, kept /-assets/ for backward compat
- editor-toolbar.js: fixed editor.on('change') placement (was inside switchMode)
- content-edit.php and content-new.php: back-btn unsaved-changes detection
- Removed unused __editorCleanup global
35 lines
1.7 KiB
PHP
35 lines
1.7 KiB
PHP
<h2 class="mb-4"><i class="bi bi-arrows-move"></i> <?= is_file($fullPath) ? 'Bestand' : 'Map' ?> verplaatsen</h2>
|
|
|
|
<form method="post" class="card shadow-sm">
|
|
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($csrf) ?>">
|
|
|
|
<div class="card-body">
|
|
<div class="mb-3">
|
|
<label class="form-label text-muted">Te verplaatsen item</label>
|
|
<p class="form-control-plaintext fw-bold">
|
|
<i class="bi <?= is_file($fullPath) ? 'bi-file' : 'bi-folder' ?>"></i>
|
|
<?= htmlspecialchars(basename($fullPath)) ?>
|
|
</p>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="target_dir" class="form-label">Doelmap</label>
|
|
<select class="form-select" id="target_dir" name="target_dir" required>
|
|
<option value="">-- Selecteer doelmap --</option>
|
|
<option value="">/ (hoofdmap)</option>
|
|
<?php foreach ($dirs as $d): ?>
|
|
<option value="<?= htmlspecialchars($d) ?>"><?= htmlspecialchars($d) ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
<div class="form-text">Selecteer de map waar het item naartoe verplaatst moet worden.</div>
|
|
</div>
|
|
<?php if (!empty($message)): ?>
|
|
<div class="alert alert-<?= $messageType ?>"><?= htmlspecialchars($message) ?></div>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
<div class="card-footer text-end">
|
|
<a href="admin.php?route=content&dir=<?= urlencode(dirname($item) === '.' ? '' : dirname($item)) ?>" class="btn btn-secondary">Annuleren</a>
|
|
<button type="submit" class="btn btn-primary"><i class="bi bi-check-lg"></i> Verplaatsen</button>
|
|
</div>
|
|
</form>
|