b21e2b2062
* test for invite accept form rendering * show placeholder if there is no suggested alias * accept form and consume endpoint
48 lines
1.9 KiB
Cheetah
48 lines
1.9 KiB
Cheetah
{{ define "title" }}{{ i18n "InviteAcceptTitle" }}{{ end }}
|
|
{{ define "content" }}
|
|
<div class="flex flex-col justify-center items-center h-64">
|
|
|
|
<span
|
|
id="welcome"
|
|
class="text-center"
|
|
>{{ i18n "InviteAcceptWelcome" }}</span>
|
|
|
|
<form id="consume" action="{{urlTo "complete:invite:consume"}}" method="POST">
|
|
{{ .csrfField }}
|
|
<input type="hidden" name="token" value={{.Token}}>
|
|
<div class="grid grid-cols-2 gap-4">
|
|
|
|
<div class="my-4 flex flex-row items-center justify-start">
|
|
<label class="mr-2">{{ i18n "InviteAcceptPublicKey" }}</label>
|
|
<input
|
|
type="text"
|
|
name="new_member"
|
|
placeholder="@ .ed25519"
|
|
class="shadow rounded border border-transparent h-8 p-1 focus:outline-none focus:ring-2 focus:ring-pink-400 focus:border-transparent">
|
|
<span class="ml-2 text-red-400">TODO: make this a dropdown</span>
|
|
</div>
|
|
|
|
<p>{{ i18n "InviteAcceptAliasSuggestion" }}</p>
|
|
<input
|
|
type="text"
|
|
name="alias"
|
|
{{ if ne .Invite.AliasSuggestion "" }}
|
|
value="{{ .Invite.AliasSuggestion }}"
|
|
{{else}}
|
|
placeholder="you@this.room"
|
|
{{ end }}
|
|
>
|
|
|
|
<a
|
|
href="javascript:history.back()"
|
|
class="px-4 h-8 shadow rounded flex flex-row justify-center items-center bg-white align-middle text-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-opacity-50"
|
|
>{{i18n "GenericGoBack"}}</a>
|
|
|
|
<button
|
|
type="submit"
|
|
class="shadow rounded px-4 h-8 text-gray-100 bg-pink-600 hover:bg-pink-700 focus:outline-none focus:ring-2 focus:ring-pink-600 focus:ring-opacity-50"
|
|
>{{i18n "GenericConfirm"}}</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{{ end }} |