75 lines
3.0 KiB
HTML
75 lines
3.0 KiB
HTML
{#
|
|
Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
#}
|
|
|
|
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<section class="flex-1 flex flex-col justify-center gap-6">
|
|
<h1 class="cpd-text-heading-xl-semibold text-center">
|
|
{% if force_localpart %}
|
|
{{ _("mas.upstream_oauth2.register.create_account") }}
|
|
{% else %}
|
|
{{ _("mas.upstream_oauth2.register.choose_username") }}
|
|
{% endif %}
|
|
</h1>
|
|
|
|
<form method="POST" class="flex flex-col gap-6">
|
|
<input type="hidden" name="csrf" value="{{ csrf_token }}" />
|
|
<input type="hidden" name="action" value="register" />
|
|
{% if force_localpart %}
|
|
<div class="rounded-lg bg-grey-25 dark:bg-grey-450 p-4">
|
|
<div class="font-medium"> {{ _("mas.upstream_oauth2.register.forced_localpart") }}</div>
|
|
<div class="font-mono">{{ suggested_localpart }}</div>
|
|
</div>
|
|
{% else %}
|
|
{{ field.input(label=_("common.username"), name="username", autocomplete="username", autocorrect="off", autocapitalize="none") }}
|
|
{% endif %}
|
|
|
|
{% if suggested_email %}
|
|
<div class="rounded-lg bg-grey-25 dark:bg-grey-450 p-4">
|
|
<div class="font-medium">
|
|
{% if force_email %}
|
|
{{ _("mas.upstream_oauth2.register.forced_email") }}
|
|
{% else %}
|
|
<input type="checkbox" name="import_email" id="import_email" checked="checked" />
|
|
<label for="import_email">{{ _("mas.upstream_oauth2.register.suggested_email") }}</label>
|
|
{% endif %}
|
|
</div>
|
|
<div class="font-mono">{{ suggested_email }}</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if suggested_display_name %}
|
|
<div class="rounded-lg bg-grey-25 dark:bg-grey-450 p-4">
|
|
<div class="font-medium">
|
|
{% if force_display_name %}
|
|
{{ _("mas.upstream_oauth2.register.forced_display_name") }}
|
|
{% else %}
|
|
<input type="checkbox" name="import_display_name" id="import_display_name" checked="checked" />
|
|
<label for="import_display_name">{{ _("mas.upstream_oauth2.register.suggested_display_name") }}</label>
|
|
{% endif %}
|
|
</div>
|
|
<div class="font-mono">{{ suggested_display_name }}</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{{ button.button(text=_("action.create_account")) }}
|
|
</form>
|
|
{{ field.separator() }}
|
|
{{ button.link_outline(text=_("mas.upstream_oauth2.register.link_existing"), href=login_link) }}
|
|
</section>
|
|
{% endblock content %}
|