refactor(post-form): derive disclosure default from rendered markup

initDisclosure hardcoded blueprint defaults into a field-name regex
(/\[published\]$/) to decide which toggle state counts as a deviation worth
auto-expanding "More options". Read each toggle's default from the HTML
`checked` attribute instead — Grav's toggle template stamps it on the default
option, and prefill/edit only ever set the live `.checked` property — so a
future default-ON advanced toggle Just Works. Rebuilt bundle.

Code review F4 (maintainability).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mpdu3Dt1iVoozHwAMyjrbn
This commit is contained in:
2026-07-07 08:31:59 +02:00
co-authored by Claude Opus 4.8
parent 8db3ffeafc
commit 7f6bf9e3f3
2 changed files with 15 additions and 11 deletions
File diff suppressed because one or more lines are too long