Jan Dittberner
44e18ca3a5
The primary change in this commit is the introduction of consent management. A few minor improvements have been made: - move common header to ui/templates/base.gohtml - add an I18NService to unify localization - add a handlers.getLocalizer function - fix translation extraction and merging in Makefile - add a new AuthMiddleware to centralize client certificate authentication - move client certificate handling to internal/handlers/security.go - improver error handling, allow localization of HTTP error messages
37 lines
No EOL
1.6 KiB
Text
37 lines
No EOL
1.6 KiB
Text
{{ define "content" }}
|
|
<main role="main" class="container">
|
|
<h1>{{ .Title }}</h1>
|
|
<p>{{ .IntroText }}</p>
|
|
{{ with .FlashMessage }}
|
|
<div class="alert alert-{{ .Type }}" role="alert">
|
|
{{ .Message }}
|
|
</div>
|
|
{{ end }}
|
|
<form method="post">
|
|
<p>{{ .EmailChoiceText }}</p>
|
|
<div class="mb-3">
|
|
{{ if eq (len .emails) 1 }}
|
|
{{ $email_address := index .emails 0 }}
|
|
<input type="hidden" name="email" value="{{ $email_address }}" id="email_0">
|
|
<label for="email_0">{{ $email_address }}</label>
|
|
{{ else }}
|
|
{{ range $index, $element := .emails }}
|
|
<div class="form-check">
|
|
<input class="form-check-input" type="radio" name="email"
|
|
value="{{ $element }}" id="email_{{ $index }}"><label
|
|
class="form-check-label" for="email_{{ $index }}">{{ $element }}</label>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ .csrfField }}
|
|
</div>
|
|
<p class="text-left">{{ .RequestText }}</p>
|
|
<div class="mb-2">
|
|
<button class="btn btn-primary" type="submit" name="use-identity"
|
|
value="accept">{{ .AcceptLabel }}</button>
|
|
<button class="btn btn-outline-secondary" type="submit" name="use-identity"
|
|
value="reject">{{ .RejectLabel }}</button>
|
|
</div>
|
|
</form>
|
|
</main>
|
|
{{ end }} |