auth/web/ticket.qtpl

52 lines
1.1 KiB
Plaintext

{% code type TicketPage struct {
BaseOf
CSRF []byte
} %}
{% collapsespace %}
{% func (p *TicketPage) body() %}
<header>
<h1>{%= p.t("TicketAuth") %}</h1>
</header>
<main>
<form class=""
accept-charset="utf-8"
action="/ticket/send"
autocomplete="off"
enctype="application/x-www-form-urlencoded"
method="post"
target="_self">
{% if p.CSRF != nil %}
<input type="hidden"
name="_csrf"
value="{%z p.CSRF %}">
{% endif %}
<div>
<label for="subject">{%= p.t("Recipient") %}</label>
<input id="subject"
type="url"
name="subject"
inputmode="url"
placeholder="https://bob.example.org/"
required>
</div>
<div>
<label for="resource">{%= p.t("Resource") %}</label>
<input id="resource"
type="url"
name="resource"
inputmode="url"
placeholder="https://alice.example.com/private/"
required>
</div>
<button type="submit">{%= p.t("Send") %}</button>
</form>
</main>
{% endfunc %}
{% endcollapsespace %}