mirror of
https://github.com/jsiebens/ionscale.git
synced 2026-03-31 15:07:49 +01:00
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
package templates
|
|
|
|
templ Auth(oidc bool, csrf string) {
|
|
if oidc {
|
|
<div style="text-align: left; padding-bottom: 10px">
|
|
<p><b>Authentication required</b></p>
|
|
<small>Login with:</small>
|
|
</div>
|
|
<form method="post">
|
|
<input type="hidden" name="_csrf" value={ csrf } />
|
|
<ul class="selectionList">
|
|
<li><button type="submit" name="oidc" value="true">OpenID</button></li>
|
|
</ul>
|
|
</form>
|
|
<div style="text-align: left; padding-bottom: 10px; padding-top: 20px">
|
|
<small>Or enter an <label for="ak">auth key</label> here:</small>
|
|
</div>
|
|
} else {
|
|
<div style="text-align: left; padding-bottom: 10px">
|
|
<p><b>Authentication required</b></p>
|
|
<small>Enter an <label for="ak">auth key</label> here:</small>
|
|
</div>
|
|
}
|
|
|
|
<form method="post" style="text-align: right">
|
|
<input type="hidden" name="_csrf" value={ csrf } />
|
|
<p><input id="ak" name="ak" type="text"/></p>
|
|
<div style="padding-top: 10px">
|
|
<button type="submit">submit</button>
|
|
</div>
|
|
</form>
|
|
} |