- 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
29 lines
1.4 KiB
PHP
29 lines
1.4 KiB
PHP
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h2><i class="bi bi-pencil"></i> Plugin bewerken: <?= htmlspecialchars($pluginName) ?></h2>
|
|
<a href="admin.php?route=plugins" class="btn btn-outline-secondary btn-sm">
|
|
<i class="bi bi-arrow-left"></i> Terug
|
|
</a>
|
|
</div>
|
|
|
|
<div class="card shadow-sm">
|
|
<div class="card-body">
|
|
<form method="POST" action="admin.php?route=plugins-edit&plugin=<?= urlencode($pluginName) ?>" id="editor-form">
|
|
<input type="hidden" name="csrf_token" value="<?= $csrf ?>">
|
|
<div class="d-flex justify-content-between align-items-center mb-2">
|
|
<span class="badge bg-secondary">PHP</span>
|
|
<small class="text-muted"><?= htmlspecialchars($pluginName) ?>/<?= htmlspecialchars($pluginName) ?>.php</small>
|
|
</div>
|
|
<div class="editor-toolbar" id="editor-toolbar"></div>
|
|
<div class="editor-wrapper">
|
|
<textarea name="content" id="editor-textarea" data-ext="php"><?= htmlspecialchars($fileContent) ?></textarea>
|
|
</div>
|
|
<div class="d-flex gap-2 mt-3">
|
|
<button type="submit" class="btn btn-primary">
|
|
<i class="bi bi-check-lg"></i> Opslaan
|
|
</button>
|
|
<a href="admin.php?route=plugins" class="btn btn-outline-secondary">Annuleren</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|