2021-02-01 10:52:50 -05:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
2021-02-03 15:31:23 -05:00
|
|
|
<title>Create your account</title>
|
2021-02-01 10:52:50 -05:00
|
|
|
<meta charset="utf-8">
|
2022-08-11 09:04:20 -04:00
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2021-02-03 15:31:23 -05:00
|
|
|
<script type="text/javascript">
|
|
|
|
let wasKeyboard = false;
|
|
|
|
document.addEventListener("mousedown", function() { wasKeyboard = false; });
|
|
|
|
document.addEventListener("keydown", function() { wasKeyboard = true; });
|
|
|
|
document.addEventListener("focusin", function() {
|
|
|
|
if (wasKeyboard) {
|
|
|
|
document.body.classList.add("keyboard-focus");
|
|
|
|
} else {
|
|
|
|
document.body.classList.remove("keyboard-focus");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
2021-02-01 10:52:50 -05:00
|
|
|
<style type="text/css">
|
|
|
|
{% include "sso.css" without context %}
|
|
|
|
|
2021-02-03 15:31:23 -05:00
|
|
|
body.keyboard-focus :focus, body.keyboard-focus .username_input:focus-within {
|
|
|
|
outline: 3px solid #17191C;
|
|
|
|
outline-offset: 4px;
|
|
|
|
}
|
|
|
|
|
2021-02-01 10:52:50 -05:00
|
|
|
.username_input {
|
|
|
|
display: flex;
|
|
|
|
border: 2px solid #418DED;
|
|
|
|
border-radius: 8px;
|
|
|
|
padding: 12px;
|
|
|
|
position: relative;
|
|
|
|
margin: 16px 0;
|
|
|
|
align-items: center;
|
|
|
|
font-size: 12px;
|
|
|
|
}
|
|
|
|
|
2021-02-03 12:52:55 -05:00
|
|
|
.username_input.invalid {
|
|
|
|
border-color: #FE2928;
|
|
|
|
}
|
|
|
|
|
|
|
|
.username_input.invalid input, .username_input.invalid label {
|
|
|
|
color: #FE2928;
|
|
|
|
}
|
|
|
|
|
|
|
|
.username_input div, .username_input input {
|
|
|
|
line-height: 18px;
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
|
2021-02-01 10:52:50 -05:00
|
|
|
.username_input label {
|
|
|
|
position: absolute;
|
2021-02-03 15:31:23 -05:00
|
|
|
top: -5px;
|
2021-02-01 10:52:50 -05:00
|
|
|
left: 14px;
|
2021-02-03 15:31:23 -05:00
|
|
|
font-size: 10px;
|
|
|
|
line-height: 10px;
|
2021-02-01 10:52:50 -05:00
|
|
|
background: white;
|
2021-02-03 15:31:23 -05:00
|
|
|
padding: 0 2px;
|
2021-02-01 10:52:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
.username_input input {
|
|
|
|
flex: 1;
|
|
|
|
display: block;
|
|
|
|
min-width: 0;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
2021-02-03 15:31:23 -05:00
|
|
|
/* only clear the outline if we know it will be shown on the parent div using :focus-within */
|
|
|
|
@supports selector(:focus-within) {
|
|
|
|
.username_input input {
|
|
|
|
outline: none !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-01 10:52:50 -05:00
|
|
|
.username_input div {
|
|
|
|
color: #8D99A5;
|
|
|
|
}
|
|
|
|
|
|
|
|
.idp-pick-details {
|
|
|
|
border: 1px solid #E9ECF1;
|
|
|
|
border-radius: 8px;
|
|
|
|
margin: 24px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.idp-pick-details h2 {
|
|
|
|
margin: 0;
|
|
|
|
padding: 8px 12px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.idp-pick-details .idp-detail {
|
|
|
|
border-top: 1px solid #E9ECF1;
|
|
|
|
padding: 12px;
|
2021-02-03 15:31:23 -05:00
|
|
|
display: block;
|
2021-02-01 10:52:50 -05:00
|
|
|
}
|
2021-02-01 12:30:42 -05:00
|
|
|
.idp-pick-details .check-row {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.idp-pick-details .check-row .name {
|
|
|
|
flex: 1;
|
|
|
|
}
|
2021-02-01 10:52:50 -05:00
|
|
|
|
|
|
|
.idp-pick-details .use, .idp-pick-details .idp-value {
|
|
|
|
color: #737D8C;
|
|
|
|
}
|
|
|
|
|
|
|
|
.idp-pick-details .idp-value {
|
|
|
|
margin: 0;
|
|
|
|
margin-top: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.idp-pick-details .avatar {
|
|
|
|
width: 53px;
|
|
|
|
height: 53px;
|
|
|
|
border-radius: 100%;
|
|
|
|
display: block;
|
|
|
|
margin-top: 8px;
|
|
|
|
}
|
2021-02-03 12:52:55 -05:00
|
|
|
|
|
|
|
output {
|
|
|
|
padding: 0 14px;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
output.error {
|
|
|
|
color: #FE2928;
|
|
|
|
}
|
2021-02-01 10:52:50 -05:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
2022-03-22 06:22:25 -04:00
|
|
|
<h1>Create your account</h1>
|
|
|
|
<p>This is required. Continue to create your account on {{ server_name }}. You can't change this later.</p>
|
2021-02-01 10:52:50 -05:00
|
|
|
</header>
|
|
|
|
<main>
|
|
|
|
<form method="post" class="form__input" id="form">
|
2021-02-03 12:52:55 -05:00
|
|
|
<div class="username_input" id="username_input">
|
2022-03-22 06:22:25 -04:00
|
|
|
<label for="field-username">Username (required)</label>
|
2021-02-01 10:52:50 -05:00
|
|
|
<div class="prefix">@</div>
|
2022-07-26 04:08:20 -04:00
|
|
|
<input type="text" name="username" id="field-username" value="{{ user_attributes.localpart }}" autofocus autocorrect="off" autocapitalize="none">
|
2021-02-01 10:52:50 -05:00
|
|
|
<div class="postfix">:{{ server_name }}</div>
|
|
|
|
</div>
|
2021-02-03 12:52:55 -05:00
|
|
|
<output for="username_input" id="field-username-output"></output>
|
2021-02-01 10:52:50 -05:00
|
|
|
<input type="submit" value="Continue" class="primary-button">
|
2021-02-03 15:31:23 -05:00
|
|
|
{% if user_attributes.avatar_url or user_attributes.display_name or user_attributes.emails %}
|
2021-02-01 10:52:50 -05:00
|
|
|
<section class="idp-pick-details">
|
2022-03-22 06:22:25 -04:00
|
|
|
<h2>{% if idp.idp_icon %}<img src="{{ idp.idp_icon | mxc_to_http(24, 24) }}"/>{% endif %}Optional data from {{ idp.idp_name }}</h2>
|
2021-02-01 10:52:50 -05:00
|
|
|
{% if user_attributes.avatar_url %}
|
2021-02-03 15:31:23 -05:00
|
|
|
<label class="idp-detail idp-avatar" for="idp-avatar">
|
2021-02-01 12:30:42 -05:00
|
|
|
<div class="check-row">
|
2021-02-03 15:31:23 -05:00
|
|
|
<span class="name">Avatar</span>
|
|
|
|
<span class="use">Use</span>
|
2021-02-01 12:30:42 -05:00
|
|
|
<input type="checkbox" name="use_avatar" id="idp-avatar" value="true" checked>
|
|
|
|
</div>
|
2021-02-01 10:52:50 -05:00
|
|
|
<img src="{{ user_attributes.avatar_url }}" class="avatar" />
|
2021-02-03 15:31:23 -05:00
|
|
|
</label>
|
2021-02-01 10:52:50 -05:00
|
|
|
{% endif %}
|
|
|
|
{% if user_attributes.display_name %}
|
2021-02-03 15:31:23 -05:00
|
|
|
<label class="idp-detail" for="idp-displayname">
|
2021-02-01 12:30:42 -05:00
|
|
|
<div class="check-row">
|
2021-02-03 15:31:23 -05:00
|
|
|
<span class="name">Display name</span>
|
|
|
|
<span class="use">Use</span>
|
2021-02-01 12:30:42 -05:00
|
|
|
<input type="checkbox" name="use_display_name" id="idp-displayname" value="true" checked>
|
|
|
|
</div>
|
2021-02-01 10:52:50 -05:00
|
|
|
<p class="idp-value">{{ user_attributes.display_name }}</p>
|
2021-02-03 15:31:23 -05:00
|
|
|
</label>
|
2021-02-01 10:52:50 -05:00
|
|
|
{% endif %}
|
|
|
|
{% for email in user_attributes.emails %}
|
2021-02-03 15:31:23 -05:00
|
|
|
<label class="idp-detail" for="idp-email{{ loop.index }}">
|
2021-02-01 12:30:42 -05:00
|
|
|
<div class="check-row">
|
2021-02-03 15:31:23 -05:00
|
|
|
<span class="name">E-mail</span>
|
|
|
|
<span class="use">Use</span>
|
2021-02-01 12:30:42 -05:00
|
|
|
<input type="checkbox" name="use_email" id="idp-email{{ loop.index }}" value="{{ email }}" checked>
|
|
|
|
</div>
|
2021-02-01 10:52:50 -05:00
|
|
|
<p class="idp-value">{{ email }}</p>
|
2021-02-03 15:31:23 -05:00
|
|
|
</label>
|
2021-02-01 10:52:50 -05:00
|
|
|
{% endfor %}
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
</form>
|
|
|
|
</main>
|
2021-02-03 15:31:23 -05:00
|
|
|
{% include "sso_footer.html" without context %}
|
2021-02-01 10:52:50 -05:00
|
|
|
<script type="text/javascript">
|
|
|
|
{% include "sso_auth_account_details.js" without context %}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|