MarseyWorld/files/templates/settings_security.html

266 lines
8.1 KiB
HTML
Raw Normal View History

2021-10-15 14:08:27 +00:00
{% extends "settings.html" %}
2022-01-13 23:39:39 +00:00
{% block pagetitle %}Security Settings - {{SITE_NAME}}{% endblock %}
2021-10-15 14:08:27 +00:00
{% block content %}
2021-12-14 22:48:37 +00:00
2022-01-22 11:54:48 +00:00
<script src="/static/assets/js/settings_security.js?a=220"></script>
2021-12-14 22:48:37 +00:00
2021-12-03 02:54:52 +00:00
<div class="row">
2021-12-14 22:48:37 +00:00
<div class="col col-lg-8">
<div class="settings">
<h2 class="h5">Email</h2>
<p class="text-small text-muted">Change the email address used to sign in to your account.</p>
<div class="settings-section rounded">
<form action="/settings/security" method="post">
2021-12-28 12:41:26 +00:00
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
2021-12-14 22:48:37 +00:00
<div class="body">
<div class="d-lg-flex">
<label for="new-email" class="w-lg-25">Email</label>
<div class="w-lg-100">
2021-12-28 12:41:26 +00:00
<input autocomplete="off" class="form-control" id="new_email" {% if v.email %}placeholder="{{v.email}}"{% else %}placeholder="Your email"{% endif %}
2021-12-14 22:48:37 +00:00
aria-describedby="new_email" type="email" name="new_email" required>
{% if v.email and not v.is_activated %}
2021-12-30 05:27:22 +00:00
<div class="text-danger text-small-extra mt-1" id="email-verify-text">Email not verified. You will not be able to recover your account with this email until you verify it. <u><a role="button" onclick="post_toast('/verify_email');emailVerifyText();" class="text-danger">Verify now.</a></u></div>
2021-12-14 22:48:37 +00:00
{% elif not v.email %}
<div class="text-danger text-small-extra mt-1" id="email-verify-text">Add an email to secure your account in case you forget your password.</div>
2021-12-03 02:54:52 +00:00
{% endif %}
</div>
</div>
2021-12-14 22:48:37 +00:00
<div class="d-lg-flex mt-3">
<label for="email-password" class="w-lg-25 d-none" id="email-password-label">Password</label>
<div class="w-lg-100">
2021-12-28 12:41:26 +00:00
<input autocomplete="off" type="password" class="form-control mb-2 d-none" id="email-password" name="password" required>
2021-12-14 22:48:37 +00:00
<small id="emailpasswordRequired" class="form-text font-weight-bold text-danger d-none mt-1">Password required to update your email.</small>
</div>
</div>
<small id="emailpasswordRequired" class="form-text font-weight-bold text-danger d-none mt-1">Password required to update your email.</small>
2021-12-03 02:54:52 +00:00
</div>
2021-12-14 22:48:37 +00:00
<div class="footer">
<div class="d-flex">
2021-12-30 05:27:22 +00:00
<a class="btn btn-success" role="button" onclick="post_toast('/settings/gumroad')">Claim paypig rewards</a>
2021-12-14 22:48:37 +00:00
{% if v.email %}
2021-12-28 12:41:26 +00:00
<input autocomplete="off" class="btn btn-primary ml-auto"
2021-12-14 22:48:37 +00:00
type="submit" value="Update email">
{% else %}
2021-12-28 12:41:26 +00:00
<input autocomplete="off" class="btn btn-primary ml-auto"
2021-12-14 22:48:37 +00:00
type="submit" value="Add email">
{% endif %}
</div>
<span class="text-small-extra text-muted pl-1">Must be same email as gumroad</span>
</div>
</form>
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<h2 class="h5">Password</h2>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<p class="text-small text-muted">Change your account password.</p>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="settings-section rounded">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<form action="/settings/security" method="post">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="body">
2021-10-15 14:08:27 +00:00
2022-01-28 00:28:49 +00:00
2021-12-14 22:48:37 +00:00
<div class="d-lg-flex">
2021-10-15 14:08:27 +00:00
2022-01-28 00:28:49 +00:00
<label for="old_password" class="mb-0 w-lg-25">Old Password</label>
<input autocomplete="off" class="form-control mb-2 w-lg-100" id="old_password"
aria-describedby="old_password" type="password" name="old_password"
required>
</div>
<div class="d-lg-flex mt-5">
2021-12-14 22:48:37 +00:00
<label for="new_password" class="mb-0 w-lg-25">New Password</label>
2021-10-15 14:08:27 +00:00
2021-12-28 12:41:26 +00:00
<input autocomplete="off" class="form-control w-lg-100" id="new_password"
aria-describedby="new_password" type="password" name="new_password"
2021-12-14 22:48:37 +00:00
required>
<small id="passwordHelpChange"
class="form-text font-weight-bold text-muted d-none mt-1 w-lg-100">Minimum of 8
characters
2021-12-03 02:54:52 +00:00
required.</small>
<small id="passwordHelpChangeSuccess"
2021-12-14 22:48:37 +00:00
class="form-text font-weight-bold text-success d-none mt-1 w-lg-100">Your password
2021-12-03 02:54:52 +00:00
meets the
requirements.
</small>
2021-10-15 14:08:27 +00:00
2021-12-03 02:54:52 +00:00
</div>
2021-10-15 14:08:27 +00:00
2022-01-28 00:28:49 +00:00
<div class="d-lg-flex mt-4">
2021-10-15 14:08:27 +00:00
2021-12-03 02:54:52 +00:00
<label for="cnf_password" class="mb-0 w-lg-25">Confirm New Password</label>
2021-10-15 14:08:27 +00:00
2021-12-28 12:41:26 +00:00
<input autocomplete="off" class="form-control w-lg-100" id="cnf_password"
aria-describedby="cnf_password" type="password" name="cnf_password"
2021-12-03 02:54:52 +00:00
required>
2021-10-15 14:08:27 +00:00
2021-12-03 02:54:52 +00:00
<small id="passwordHelpCnf"
2021-12-14 22:48:37 +00:00
class="form-text font-weight-bold text-muted d-none mt-1 w-lg-100">Passwords do not
match.</small>
<small id="passwordHelpCnfSuccess"
class="form-text font-weight-bold text-success d-none mt-1 w-lg-100">Passwords match.
</small>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-03 02:54:52 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="footer">
2021-10-15 14:08:27 +00:00
2021-12-28 12:41:26 +00:00
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
<input autocomplete="off" type="hidden" name="now" value="1563891643">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="d-flex">
2021-10-15 14:08:27 +00:00
2021-12-28 12:41:26 +00:00
<input autocomplete="off" class="btn btn-primary ml-auto"
2021-12-14 22:48:37 +00:00
type="submit" value="Change Password">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-03 02:54:52 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</form>
2021-10-15 14:08:27 +00:00
2021-12-03 02:54:52 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-03 02:54:52 +00:00
<h2 class="h5">Two-Factor Authentication</h2>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<p class="text-small text-muted">Change the two-factor settings for your account.</p>
2021-10-15 14:08:27 +00:00
2021-12-03 02:54:52 +00:00
<div class="settings-section rounded">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="d-lg-flex">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="title w-lg-25">
<label for="2faToggle">Use 2-step login</label>
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="body w-lg-100">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="custom-control custom-switch">
2022-01-16 02:46:42 +00:00
<input autocomplete="off" type="checkbox" class="custom-control-input" id="2faToggle" name="2faToggle" onchange="twoStepModal.show()" {% if v.mfa_secret %}checked{% endif %}>
2021-12-14 22:48:37 +00:00
<label class="custom-control-label" for="2faToggle"></label>
2021-12-03 02:54:52 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-30 20:56:20 +00:00
<span class="text-small-extra text-muted">This requires entering a randomly-generated, 6-digit code and your password to login. See <a role="button">Google Authenticator</a> or <a role="button">Authy</a> for more details.</span>
2021-12-14 22:48:37 +00:00
2021-12-03 02:54:52 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-03 02:54:52 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</div>
2021-12-03 02:54:52 +00:00
<h2 class="h5">Log Out Everywhere</h2>
2021-10-15 14:08:27 +00:00
2022-01-13 23:39:39 +00:00
<p class="text-small text-muted">Log all other devices out of your {{SITE_NAME}} account.</p>
2021-10-15 14:08:27 +00:00
2021-12-03 02:54:52 +00:00
<div class="settings-section rounded">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<form action="/settings/log_out_all_others" method="post">
2021-12-28 12:41:26 +00:00
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="body">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="d-lg-flex">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<label for="forcelog-password" class="w-lg-25" id="email-password-label">Password</label>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="w-lg-100">
2021-10-15 14:08:27 +00:00
2021-12-28 12:41:26 +00:00
<input autocomplete="off" type="password" class="form-control mb-2" id="forcelog-password" name="password" required>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<small id="emailpasswordRequired" class="form-text mt-1">This will also invalidate any existing recovery links associated with this account.</small>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="footer">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="d-flex">
2021-10-15 14:08:27 +00:00
2021-12-28 12:41:26 +00:00
<input autocomplete="off" class="btn btn-primary ml-auto"
2021-12-14 22:48:37 +00:00
type="submit" value="Log out everywhere">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</form>
2021-10-15 14:08:27 +00:00
</div>
</div>
</div>
</div>
2021-12-14 22:48:37 +00:00
</div>
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="modal fade" id="deleteAccountModal" tabindex="-1" role="dialog" aria-labelledby="deleteAccountModal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
2022-01-13 23:39:39 +00:00
<h5 class="modal-title">Delete your {{SITE_NAME}} account</h5>
2021-12-30 05:27:22 +00:00
<button role="button" class="close" data-bs-dismiss="modal" aria-label="Close">
2021-12-14 22:48:37 +00:00
<span aria-hidden="true"><i class="far fa-times"></i></span>
</button>
</div>
<div class="" id="deleteFormContainer">
<form id="deleteAccountForm" method="post" action="/settings/delete_account">
2021-12-28 12:41:26 +00:00
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
2021-12-14 22:48:37 +00:00
<div class="modal-body body">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="d-lg-flex">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<label for="delete-password" class="w-lg-25" id="email-password-label">Password</label>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="w-lg-100">
2021-10-15 14:08:27 +00:00
2021-12-28 12:41:26 +00:00
<input autocomplete="off" type="password" class="form-control mb-2" id="delete-password" name="password" required>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
</div>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
{% if v.mfa_secret %}
<div class="d-lg-flex mt-3">
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<label for="delete-mfa" class="w-lg-25" id="email-password-label">Two-Factor Code</label>
2021-10-15 14:08:27 +00:00
2021-12-14 22:48:37 +00:00
<div class="w-lg-100">
2021-10-15 14:08:27 +00:00
2021-12-28 12:41:26 +00:00
<input autocomplete="off" type="text" class="form-control mb-2" id="delete-mfa" name="twofactor" required>
2021-12-14 22:48:37 +00:00
</div>
2021-10-15 14:08:27 +00:00
</div>
2021-12-14 22:48:37 +00:00
{% endif %}
2021-12-03 02:54:52 +00:00
</div>
2021-12-14 22:48:37 +00:00
</form>
</div>
2021-12-03 02:54:52 +00:00
</div>
2021-10-15 14:08:27 +00:00
2022-01-16 02:46:44 +00:00
{% endblock %}