Passport/pkg/views/mfa.gohtml

60 lines
1.5 KiB
Plaintext

<div class="left-part">
<img class="logo" alt="Logo" src="/favicon.png" width="64" height="64" />
<h1 class="title">{{.i18n.title}}</h1>
<p class="caption">{{.i18n.caption}}</p>
</div>
<div class="right-part">
<div class="responsive-title-gap"></div>
<form class="action-form" action="/mfa" method="POST">
<label>
<input name="ticket_id" value="{{.ticket_id}}" hidden>
</label>
{{if ne .redirect_uri nil}}
<label>
<input name="redirect_uri" value="{{.redirect_uri}}" hidden>
</label>
{{end}}
<div class="block-field factor-list" role="radiogroup">
{{range $_, $element := .factors}}
<div class="factor-label">
<div class="form-check">
<input class="form-check-input" type="radio" name="factor_id" id="factor-{{$element.id}}"
value="{{$element.id}}">
<label class="form-check-label" for="factor-{{$element.id}}">
{{$element.name}}
</label>
</div>
</div>
{{end}}
</div>
<div class="action-form-buttons">
<button class="btn btn-primary" type="submit">{{.i18n.next}}</button>
</div>
</form>
</div>
<style>
.factor-list {
display: flex;
flex-direction: column;
}
.factor-label {
display: flex;
align-items: center;
}
.factor-label label {
display: inline-flex;
place-items: center;
gap: 8px;
font-family: Roboto, system-ui;
color: var(--md-sys-color-on-background);
}
</style>