mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
fix: duplicate warning not shown in admin, double-encoded in partage, no focus
- toast-fragment.php: 204 early-exit now also checks flash['warning']; previously the warning was consumed by consumeFlash() then silently dropped - partage/index.php: store warning as plain text; htmlspecialchars() applied once at render time — previously htmlspecialchars() was called inside the stored string then again at output, producing ' entities etc. - partage/index.php: flash-warning div gets id + tabindex=-1; inline JS scrolls it into view and focuses it on DOMContentLoaded - admin/footer.php: htmx:afterSettle listener focuses .toast--warning after HTMX injects the toast fragment into #toast-region
This commit is contained in:
8
TODO.md
8
TODO.md
@@ -1,6 +1,6 @@
|
||||
# XAMXAM TODO
|
||||
|
||||
## Duplicate TFE submission prevention
|
||||
## Duplicate TFE submission prevention (fixes)
|
||||
- [x] `DuplicateThesisException` — typed exception carrying existing thesis metadata
|
||||
- [x] `Database::findDuplicateThesis()` — year + author + normalised-title matching (exact, prefix, Levenshtein ≤10%)
|
||||
- [x] `ThesisCreateController::submit()` — calls duplicate check before any DB write, throws `DuplicateThesisException`
|
||||
@@ -11,3 +11,9 @@
|
||||
- [x] `toast.php` — renders `toast--warning` block
|
||||
- [x] `admin.css` — `.toast--warning` style + link colour
|
||||
- [x] `form.css` — `.flash-warning` style (partage form)
|
||||
|
||||
## Duplicate warning display fixes
|
||||
- [x] `toast-fragment.php` — 204 guard now also checks `warning`; warning was silently discarded before
|
||||
- [x] `partage/index.php` — warning stored as plain text (no pre-escaping); `htmlspecialchars()` applied once at render; was double-encoded before
|
||||
- [x] `partage/index.php` — `flash-warning` div gets `id` + `tabindex=-1`; inline JS scrolls and focuses it on load
|
||||
- [x] `admin/footer.php` — `htmx:afterSettle` listener focuses `.toast--warning` after HTMX injects the toast fragment
|
||||
|
||||
Reference in New Issue
Block a user