{{- /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial */ -}} {{- /* SPDX-FileCopyrightText: 2025-2026 Christian Galo */ -}} {{/* operator_org_type_card.html One organization type's section: the display name titles it through sectionHeader, outside the card, with the type key in the header's Key slot (overview-consistency D9); the card's first line is the state badge, and the description and the current default fold into one muted details line below it (design D22, org-types "The default-change form states its facts plainly"; the round-1 "Current: …" line is gone). The section element wraps header and card and is the per-type HTMX swap target: selecting a candidate default posts a read-only preview (classification) that re-renders it, so the pending selection is server-rendered state no swap can silently discard; the commit enacts the change with explicit per-bucket dispositions. Rendered standalone by renderOrgTypeCard and inside operator_org_types.html. Built from the page-anatomy parts (docs/design-system.md §6): the preview and the committed result are in-page alerts, the state is a statusBadge, and the disabled-control part gates the commit until every bucket has a disposition. */}}
{{ template "sectionHeader" .Header }}
{{ template "statusBadge" .ActiveBadge }}

{{ if .Description }}{{ .Description }} · {{ end }}{{ if .DefaultBroken }}{{ .DefaultPlanSummary }}{{ else }}{{ .DefaultPlanSummary }}{{ end }}

{{ if .Error }} {{ end }} {{ if eq (len .PlanLadders) 0 }}

No plan ladders exist yet. A plan ladder with a rank-0 tier must exist before this type can have a default plan. Go to Plan ladders.

{{ else }} {{/* The select and, once a preview exists, the disposition radios and the commit: one declared form (design D10, D22). The preview's classification list is the form's own Message, rendered inside the same box (design D10's preview idiom). Every trigger inside re-renders the whole card; htmx's settle step would first copy the OLD element's attributes onto each NEW element with the same id, then restore the new attributes after the settle delay, which used to unselect a just-chosen disposition radio ("Migrate" chosen after "Grandfather" rendered focused but unselected, round 4, 2026-09-03). The settle delay is now 0 for the whole app (the shells' htmx-config, design D30), so no swap clones attributes. */}} {{ template "form" .Form }} {{ end }} {{/* design D9, org-types "the alert-in-body success replaced by the toast" (finding FA-25): the commit's own toast (fireSuccessToast / fireErrorToast, CommitOrgTypeDefaultChange) reports the outcome; the body renders only the per-org failure detail a toast cannot carry, and only when there is one. */}} {{ with .Result }} {{ if gt (len .Failures) 0 }} {{ end }} {{ end }}