A notice is now a closed Go value, notice.Notice, in a package that imports nothing of the console, rendered by one template part. It carries one of five tones named by meaning (Problem, Warning, Done, Information, Preview), its words as escaped runs (plain, strong, code), an optional link, an optional action that posts, a body only the console's own templates fill, and an optional close route. The part sets the glyph, the hidden "Error: " or "Warning: " a screen reader hears, and the role: alert for a Problem, status for the rest. A box takes its size from where it sits, full on a page and compact inside a card, a modal or a form's box; a line has no box. The preview tone is a pale fill with a 1px dashed edge, worn only by the form part's preview box and the Rows tray. Every alert at HEAD renders through the part: 83 in 49 files, plus the status lines and the checkout refusals. The 29 visible "Error:" prefixes go. A notice is closable only when its owner records the closing on its own row; the organization types error loses the close button that recorded nothing. The raw-notice lint refuses alert markup and alert roles outside the part, in templates and Go strings. The toasts move into one shared partial on every layout, member pages gain the load-time flash, the error toast stays until it is closed, the filler-copy lint reads the console's own scripts, and three toast strings drop "Please". The no-JS lookup's no-match answered 500 and now renders its notice. The organization type card showed a refused default change twice and now shows it once, in the form. The tier reorder preview's failed read moves to the form's own slot, outside the preview's status region. Closes #167 and #22.
169 lines
4.8 KiB
HTML
169 lines
4.8 KiB
HTML
|
|
===== shell.confirm unbound
|
|
|
|
|
|
|
|
<form id="form-shell.confirm" data-form="shell.confirm" data-form-kind="confirm" class="app-form" hx-post="/partials/confirm" hx-target="this" hx-swap="outerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-shell.confirm-error" class="app-form-error"></div>
|
|
|
|
<p id="form-shell.confirm-message" class="app-form-message mb-2"></p>
|
|
|
|
|
|
|
|
<div class="app-form-fields">
|
|
|
|
</div>
|
|
<div class="d-flex flex-wrap gap-2 app-form-commit">
|
|
|
|
<button type="submit" class="btn btn-danger"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Confirm</button>
|
|
|
|
|
|
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
|
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== shell.confirm unbound edit side
|
|
|
|
|
|
|
|
<form id="form-shell.confirm" data-form="shell.confirm" data-form-kind="confirm" class="app-form" hx-post="/partials/confirm" hx-target="this" hx-swap="outerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-shell.confirm-error" class="app-form-error"></div>
|
|
|
|
<p id="form-shell.confirm-message" class="app-form-message mb-2"></p>
|
|
|
|
|
|
|
|
<div class="app-form-fields">
|
|
|
|
</div>
|
|
<div class="d-flex flex-wrap gap-2 app-form-commit">
|
|
|
|
<button type="submit" class="btn btn-danger"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Confirm</button>
|
|
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== shell.confirm create side
|
|
|
|
|
|
|
|
<form id="form-shell.confirm" data-form="shell.confirm" data-form-kind="confirm" class="app-form" hx-post="/partials/confirm" hx-target="this" hx-swap="outerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-shell.confirm-error" class="app-form-error"></div>
|
|
|
|
<p id="form-shell.confirm-message" class="app-form-message mb-2"></p>
|
|
|
|
|
|
|
|
<div class="app-form-fields">
|
|
|
|
</div>
|
|
<div class="d-flex flex-wrap gap-2 app-form-commit">
|
|
|
|
<button type="submit" class="btn btn-danger"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Confirm</button>
|
|
|
|
|
|
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
|
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== shell.confirm unbound with values
|
|
|
|
|
|
|
|
<form id="form-shell.confirm" data-form="shell.confirm" data-form-kind="confirm" class="app-form" hx-post="/partials/confirm" hx-target="this" hx-swap="outerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-shell.confirm-error" class="app-form-error"></div>
|
|
|
|
<p id="form-shell.confirm-message" class="app-form-message mb-2"></p>
|
|
|
|
|
|
|
|
<div class="app-form-fields">
|
|
|
|
</div>
|
|
<div class="d-flex flex-wrap gap-2 app-form-commit">
|
|
|
|
<button type="submit" class="btn btn-danger"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Confirm</button>
|
|
|
|
|
|
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
|
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== shell.confirm record
|
|
|
|
|
|
|
|
<form id="form-shell.confirm-i1" data-form="shell.confirm" data-form-kind="confirm" class="app-form" hx-post="/partials/confirm" hx-target="this" hx-swap="outerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-shell.confirm-i1-error" class="app-form-error"></div>
|
|
|
|
<p id="form-shell.confirm-i1-message" class="app-form-message mb-2"><p>msg</p></p>
|
|
|
|
|
|
|
|
<div class="app-form-fields">
|
|
|
|
</div>
|
|
<div class="d-flex flex-wrap gap-2 app-form-commit">
|
|
|
|
<button type="submit" class="btn btn-danger"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Confirm</button>
|
|
|
|
|
|
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
|
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== shell.confirm refused []
|
|
|
|
|
|
|
|
<form id="form-shell.confirm" data-form="shell.confirm" data-form-kind="confirm" class="app-form" hx-post="/partials/confirm" hx-target="this" hx-swap="outerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-shell.confirm-error" class="app-form-error"></div>
|
|
|
|
<p id="form-shell.confirm-message" class="app-form-message mb-2"></p>
|
|
|
|
|
|
|
|
<div class="app-form-fields">
|
|
|
|
</div>
|
|
<div class="d-flex flex-wrap gap-2 app-form-commit">
|
|
|
|
<button type="submit" class="btn btn-danger"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Confirm</button>
|
|
|
|
|
|
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
|
|
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== shell.confirm bad-values refusals
|
|
|