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.
328 lines
11 KiB
HTML
328 lines
11 KiB
HTML
|
|
===== discourse.mapping.create unbound
|
|
|
|
|
|
|
|
<form id="form-discourse.mapping.create" data-form="discourse.mapping.create" data-form-kind="sub-record" class="app-form app-form-dense" novalidate hx-post="/partials/operator/discourse/mappings" hx-target="#operator-body" hx-swap="innerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-discourse.mapping.create-error" class="app-form-error"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row g-2 align-items-start app-form-dense-row">
|
|
<div id="form-discourse.mapping.create-resource_key" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-resource_key-control">Entitlement</label>
|
|
|
|
<select class="form-select form-select-sm" id="form-discourse.mapping.create-resource_key-control" name="resource_key" required>
|
|
<option value="" disabled selected>Choose one</option>
|
|
<option value="a">Alpha</option>
|
|
<option value="b">Beta</option>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div><div id="form-discourse.mapping.create-group_name" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-group_name-control">Discourse group name</label>
|
|
|
|
<input type="text" class="form-control form-control-sm" id="form-discourse.mapping.create-group_name-control" name="group_name" value="" placeholder="e.g. members" required autocomplete="off">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-auto app-form-commit app-form-unlabeled">
|
|
|
|
<button type="submit" class="btn btn-primary btn-sm"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Map group</button>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== discourse.mapping.create unbound edit side
|
|
|
|
|
|
|
|
<form id="form-discourse.mapping.create" data-form="discourse.mapping.create" data-form-kind="sub-record" class="app-form app-form-dense" novalidate hx-post="/partials/operator/discourse/mappings" hx-target="#operator-body" hx-swap="innerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-discourse.mapping.create-error" class="app-form-error"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row g-2 align-items-start app-form-dense-row">
|
|
<div id="form-discourse.mapping.create-resource_key" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-resource_key-control">Entitlement</label>
|
|
|
|
<select class="form-select form-select-sm" id="form-discourse.mapping.create-resource_key-control" name="resource_key" required>
|
|
<option value="" disabled selected>Choose one</option>
|
|
<option value="a">Alpha</option>
|
|
<option value="b">Beta</option>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div><div id="form-discourse.mapping.create-group_name" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-group_name-control">Discourse group name</label>
|
|
|
|
<input type="text" class="form-control form-control-sm" id="form-discourse.mapping.create-group_name-control" name="group_name" value="" placeholder="e.g. members" required autocomplete="off">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-auto app-form-commit app-form-unlabeled">
|
|
|
|
<button type="submit" class="btn btn-primary btn-sm"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Map group</button>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== discourse.mapping.create create side
|
|
|
|
|
|
|
|
<form id="form-discourse.mapping.create" data-form="discourse.mapping.create" data-form-kind="sub-record" class="app-form app-form-dense" novalidate hx-post="/partials/operator/discourse/mappings" hx-target="#operator-body" hx-swap="innerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-discourse.mapping.create-error" class="app-form-error"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row g-2 align-items-start app-form-dense-row">
|
|
<div id="form-discourse.mapping.create-resource_key" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-resource_key-control">Entitlement</label>
|
|
|
|
<select class="form-select form-select-sm" id="form-discourse.mapping.create-resource_key-control" name="resource_key" required>
|
|
<option value="" disabled selected>Choose one</option>
|
|
<option value="a">Alpha</option>
|
|
<option value="b">Beta</option>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div><div id="form-discourse.mapping.create-group_name" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-group_name-control">Discourse group name</label>
|
|
|
|
<input type="text" class="form-control form-control-sm" id="form-discourse.mapping.create-group_name-control" name="group_name" value="" placeholder="e.g. members" required autocomplete="off">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-auto app-form-commit app-form-unlabeled">
|
|
|
|
<button type="submit" class="btn btn-primary btn-sm"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Map group</button>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== discourse.mapping.create unbound with values
|
|
|
|
|
|
|
|
<form id="form-discourse.mapping.create" data-form="discourse.mapping.create" data-form-kind="sub-record" class="app-form app-form-dense" novalidate hx-post="/partials/operator/discourse/mappings" hx-target="#operator-body" hx-swap="innerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-discourse.mapping.create-error" class="app-form-error"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row g-2 align-items-start app-form-dense-row">
|
|
<div id="form-discourse.mapping.create-resource_key" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-resource_key-control">Entitlement</label>
|
|
|
|
<select class="form-select form-select-sm" id="form-discourse.mapping.create-resource_key-control" name="resource_key" required>
|
|
<option value="" disabled selected>Choose one</option>
|
|
<option value="a">Alpha</option>
|
|
<option value="b">Beta</option>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div><div id="form-discourse.mapping.create-group_name" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-group_name-control">Discourse group name</label>
|
|
|
|
<input type="text" class="form-control form-control-sm" id="form-discourse.mapping.create-group_name-control" name="group_name" value="" placeholder="e.g. members" required autocomplete="off">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-auto app-form-commit app-form-unlabeled">
|
|
|
|
<button type="submit" class="btn btn-primary btn-sm"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Map group</button>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== discourse.mapping.create record
|
|
|
|
|
|
|
|
<form id="form-discourse.mapping.create-i1" data-form="discourse.mapping.create" data-form-kind="sub-record" class="app-form app-form-dense" novalidate hx-post="/partials/operator/discourse/mappings" hx-target="#operator-body" hx-swap="innerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-discourse.mapping.create-i1-error" class="app-form-error"></div>
|
|
|
|
<div class="app-form-message mb-2"><p>msg</p></div>
|
|
|
|
|
|
|
|
<div class="row g-2 align-items-start app-form-dense-row">
|
|
<div id="form-discourse.mapping.create-i1-resource_key" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-i1-resource_key-control">Entitlement</label>
|
|
|
|
<select class="form-select form-select-sm" id="form-discourse.mapping.create-i1-resource_key-control" name="resource_key" required>
|
|
<option value="" disabled>Choose one</option>
|
|
<option value="a" selected>Alpha</option>
|
|
<option value="b">Beta</option>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div><div id="form-discourse.mapping.create-i1-group_name" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-i1-group_name-control">Discourse group name</label>
|
|
|
|
<input type="text" class="form-control form-control-sm" id="form-discourse.mapping.create-i1-group_name-control" name="group_name" value="sample" placeholder="e.g. members" required autocomplete="off">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div class="col-auto app-form-commit app-form-unlabeled">
|
|
|
|
<button type="submit" class="btn btn-primary btn-sm"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Map group</button>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== discourse.mapping.create refused [group_name resource_key]
|
|
|
|
|
|
|
|
<form id="form-discourse.mapping.create" data-form="discourse.mapping.create" data-form-kind="sub-record" class="app-form app-form-dense" novalidate hx-post="/partials/operator/discourse/mappings" hx-target="#operator-body" hx-swap="innerHTML" hx-disable="find button[type=submit]" hx-indicator="find .htmx-indicator">
|
|
<div id="form-discourse.mapping.create-error" class="app-form-error"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="row g-2 align-items-start app-form-dense-row">
|
|
<div id="form-discourse.mapping.create-resource_key" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-resource_key-control">Entitlement</label>
|
|
|
|
<select class="form-select form-select-sm is-invalid" id="form-discourse.mapping.create-resource_key-control" name="resource_key" required aria-describedby="form-discourse.mapping.create-resource_key-error" aria-invalid="true" autofocus>
|
|
<option value="" disabled selected>Choose one</option>
|
|
<option value="a">Alpha</option>
|
|
<option value="b">Beta</option>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="form-discourse.mapping.create-resource_key-error" class="invalid-feedback d-block">Choose an entitlement.</div>
|
|
</div><div id="form-discourse.mapping.create-group_name" class="col-12 col-xl-4 app-form-field">
|
|
|
|
|
|
<label class="form-label form-label-sm" for="form-discourse.mapping.create-group_name-control">Discourse group name</label>
|
|
|
|
<input type="text" class="form-control form-control-sm is-invalid" id="form-discourse.mapping.create-group_name-control" name="group_name" value="" placeholder="e.g. members" required autocomplete="off" aria-describedby="form-discourse.mapping.create-group_name-error" aria-invalid="true">
|
|
|
|
|
|
|
|
|
|
|
|
<div id="form-discourse.mapping.create-group_name-error" class="invalid-feedback d-block">Enter a discourse group name.</div>
|
|
</div>
|
|
<div class="col-auto app-form-commit app-form-unlabeled">
|
|
|
|
<button type="submit" class="btn btn-primary btn-sm"><span class="spinner-border spinner-border-sm htmx-indicator me-1" aria-hidden="true"></span>Map group</button>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
===== discourse.mapping.create bad-values refusals
|
|
resource_key: Choose an entitlement from the list.
|