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
41 lines
No EOL
1.7 KiB
Text
41 lines
No EOL
1.7 KiB
Text
{{ define "content" }}
|
|
<main role="main" class="container">
|
|
<h1 class="h3 mb-3">{{ .Title }}</h1>
|
|
{{ if .client.LogoUri }}
|
|
<p>
|
|
<img src="{{ .client.LogoUri }}" alt="{{ .client.ClientName }}"/>
|
|
</p>
|
|
{{ end }}
|
|
<p class="text-left">{{ .IntroConsentRequested }}</p>
|
|
<form method="post">
|
|
<ul class="list-group text-left small mb-3">
|
|
{{ range $i, $scope := .requestedScope }}
|
|
<li class="list-group-item">
|
|
<input type="hidden" name="scope[{{ $i }}]" value="{{ $scope.Name }}">
|
|
{{ $scope.Label }}</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ if .requestedClaims }}
|
|
<p class="text-left">{{ .ClaimsInformation }}</p>
|
|
<ul class="list-group text-left small mb-3">
|
|
{{ range $i, $claim := .requestedClaims }}
|
|
<li class="list-group-item">
|
|
<input type="hidden" name="claims[{{ $i }}]" value="{{ $claim.Name }}">
|
|
{{ $claim.Label }}{{ if $claim.Essential }} *{{ end}}
|
|
</li>
|
|
{{ end}}
|
|
</ul>
|
|
{{ end }}
|
|
<p class="text-left">{{ .IntroMoreInformation }}</p>
|
|
|
|
{{ .csrfField }}
|
|
<div class="checkbox mb-3">
|
|
<label>
|
|
<input type="checkbox" name="consent" id="consent" value="true"/>
|
|
{{ .LabelConsent }}</label>
|
|
</div>
|
|
|
|
<button class="btn btn-lg btn-primary btn-block" type="submit">{{ .LabelSubmit }}</button>
|
|
</form>
|
|
</main>
|
|
{{ end }} |