{{ define "modal_pattern.html" }} {{ template "demo_doc_start" . }} {{ template "demo_masthead" (dict "label" "Pattern Demo" "title" .Title "lead" "Single-modal workflow progression: edit → confirm → complete, with explicit cancel/close paths." "back_url" "/" "back_text" "← Back to catalog") }} {{ if .Open }}
{{ if eq .Open "delete" }}Confirm Destructive Action{{ else }}Edit Items{{ end }}

{{ .Message }}

{{ if eq .Stage "edit" }} {{ else if eq .Stage "confirm" }}

Confirmation Summary

  • Selected rows are listed and reviewed before submit.
  • Destructive actions require explicit confirmation wording.
  • No nested modals; stay within one modal state machine.
{{ else }}
Action completed. Show human-readable summary and next actions.
{{ end }}
{{ end }} {{ template "demo_doc_end" . }} {{ end }}