confirm.gohtml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {{define "confirm" -}}
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8">
  6. <title>Confirmation needed</title>
  7. <link rel="stylesheet" href="/assets/styles.css"/>
  8. <link rel="stylesheet" href="/assets/bootstrap.min.css">
  9. </head>
  10. <body>
  11. <main class="container mt-5">
  12. <h1 class="display-4 py-4">Confirmation needed</h1>
  13. {{ template "flashes" .flashes }}
  14. <div class="border border-{{ .level }} rounded p-3">
  15. {{ if .question }}
  16. <div>
  17. <h3 class="text-{{ .level }}">{{ .question }}</h3>
  18. </div>
  19. {{ end }}
  20. <div class="mt-3">
  21. <p class="fs-4 text">{{ .description }}</p>
  22. </div>
  23. <form method="post" action="{{ .action }}">
  24. {{ if .messages }}
  25. <ul>
  26. {{range $id, $message := .messages}}
  27. <li>
  28. {{ $message.MessageId }}
  29. <input type="hidden" name="id-{{ $id }}" value="on"/>
  30. <input type="hidden" name="mid-{{ $id }}" value="{{ $message.MessageId }}"/>
  31. <input type="hidden" name="rh-{{ $id }}" value="{{ $message.ReceiptHandle }}"/>
  32. </li>
  33. {{end}}
  34. </ul>
  35. {{end}}
  36. <input type="hidden" name="_csrf" value="{{ .csrf }}"/>
  37. <a href="{{ .cancelURL }}" class="btn btn-outline-dark btn-lg px-4">{{ .cancel }}</a>
  38. {{ if .confirm -}}
  39. <button class="btn btn-{{ .level }} btn-lg px-5">{{ .confirm }}</button>{{- end }}
  40. </form>
  41. </div>
  42. </main>
  43. </body>
  44. <script src="/assets/bootstrap.js"></script>
  45. </html>
  46. {{end}}