{% extends "_layout.html.j2" %} {% import "_components/form.html.j2" as form %} {%- block head -%} {%- endblock -%} {%- block title -%} Sign up {%- endblock -%} {%- block content -%}

{% if is_first_run %} Finish setting up {% else if let RegisterBody::UsernamePrompt { next, .. } = body && next.is_some() %} Sign up to continue {% else %} Sign up {% endif %} Matrix logo

{% match body %} {% when RegisterBody::Unavailable %}

This server is not currently accepting new accounts.

{% when RegisterBody::UsernamePrompt { allow_federation, untrusted_flow_status, trusted_flow_status, username_error, next } %}

You're about to register a new Matrix account on {{ server_name }}.

{% if allow_federation %}

Like email, Matrix is a network of servers. Your account will be able to talk to users on hundreds of different Matrix servers across the world.

{% endif %}

Choose a username to continue.

{% if let Some(next) = next %} {# urlencoded roundtrip moment #} {% let next = serde_urlencoded::to_string(&next).unwrap() %} {% for (key, value) in form_urlencoded::parse(next.as_bytes()) %} {% endfor %} {% endif %}

@ :{{ server_name }} {% if let Some(username_error) = username_error %} {{ username_error }} {% endif %}

{% if let UntrustedFlowStatus::Available { require_email } = untrusted_flow_status %} {% if require_email %} {% else %} {% endif %} {% endif %} {% if let UntrustedFlowStatus::Available { .. } = untrusted_flow_status && let TrustedFlowStatus::Available = trusted_flow_status %}
or
{% endif %} {% if let TrustedFlowStatus::Available = trusted_flow_status %} {% endif %}
{% if !is_first_run %} {% endif %} {% when RegisterBody::DetailsPrompt { username, require_email, flow, terms, validation_errors } %} {% let validation_errors = validation_errors.clone() %} {% let field_errors = validation_errors.field_errors() %}
{% if is_first_run %}

To finish setting up your server, choose a username and password for your account.

{% endif %}

@ {% if let Some(username) = username %} {% else %} {% endif %} :{{ server_name }} {{ form::errors(field_errors, std::borrow::Cow::Borrowed("username")) }} Your username cannot be changed after you create your account.

{% if !is_first_run %}

Just a few more details to finish creating your account.

{% endif %}

{{ form::errors(field_errors, std::borrow::Cow::Borrowed("password")) }}

{{ form::errors(field_errors, std::borrow::Cow::Borrowed("confirm_password")) }}

{% if require_email %}

{{ form::errors(field_errors, std::borrow::Cow::Borrowed("email")) }}

{% endif %} {% match flow %} {% when RegistrationFlowParameters::Untrusted { recaptcha_sitekey } %} {% if let Some(recaptcha_sitekey) = recaptcha_sitekey %}

{{ form::errors(field_errors, std::borrow::Cow::Borrowed("recaptcha")) }}

{% endif %} {% when RegistrationFlowParameters::Trusted { registration_token } %} {% if let Some(registration_token) = registration_token %}
{{ form::errors(field_errors, std::borrow::Cow::Borrowed("registration_token")) }}
{% else %}

{% if is_first_run %} Check the server console to find the registration token. {% endif %} {{ form::errors(field_errors, std::borrow::Cow::Borrowed("registration_token")) }}

{% endif %} {% endmatch %} {% if !terms.is_empty() %}

{% for (id, document) in terms %} {% endfor %} All policy links will open in a new tab.

{% endif %}
{% endmatch %}
{%- endblock -%}