Passport/pkg/views/mfa.gohtml

61 lines
1.7 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">
<md-radio
aria-label="{{$element.name}}"
id="factor-{{$element.id}}"
value="{{$element.id}}"
touch-target="wrapper"
name="factor_id"
>
</md-radio>
<label for="factor-{{$element.id}}">{{$element.name}}</label>
</div>
{{end}}
</div>
<div class="action-form-buttons">
<md-filled-button type="submit">{{.i18n.next}}</md-filled-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>