Files
openpanel/templates/admini/user/forgot_password.html_TODO
2024-10-25 01:44:26 +02:00

102 lines
3.8 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Meta -->
<meta name="description" content="">
<meta name="author" content="UNLIMITED.RS">
<!-- Favicon -->
<link rel="shortcut icon" type="image/x-icon" href="/static/assets/img/favicon.png">
<title>{% if brand_name %}{{brand_name}}{% else %}{{brand}}{% endif %}</title>
<!-- Template CSS -->
<link rel="stylesheet" href="/static/assets/css/style.min.css">
</head>
<body class="page-sign">
<div class="card card-sign">
<div class="card-header">
<a href="." class="header-logo mb-4">{% if brand_name %}{{brand_name}}{% else %}openpanel{% endif %}</a>
{% if email_sent %}
<div class="text-center" style="font-size: 10em;color:green;" role="img" aria-label="Check circle - large preview">
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"></path>
<path d="M10.97 4.97a.235.235 0 0 0-.02.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05z"></path>
</svg>
</div>
<h3 class="card-title text-center">Email Sent</h3>
<p class="card-text">A password reset email has been sent to your inbox, and it will remain valid for the next 30 minutes. Kindly review your email to proceed with the password reset.</p>
</div><!-- card-header -->
<div class="card-body">
<label class="form-label d-flex mt-3 justify-content-between"><a href="/login" tabindex="-1">← Back to login
</a></label>
</div>
</div><!-- card -->
{% elif not email_sent %}
{% if not twofa_enabled %}
<h3 class="card-title">Reset Password</h3>
<p class="card-text">Please provide the email address associated with your username, and a link to reset your password will be emailed to you.</p>
{% elif twofa_enabled %}
<h3 class="card-title">Verification code (2FA)</h3>
<p class="card-text">TwoFactor Authentification is enabled, please enter the 2FA code from your device.</p>
{% endif %}
</div><!-- card-header -->
<div class="card-body">
<form method="POST">
{% if not twofa_enabled %}
<!-- Username and password fields only if 2FA is not enabled -->
<div class="mb-4">
<label class="form-label">Email</label>
<input type="email" id="email" name="email" required class="form-control" placeholder="Enter your email">
</div>
{% endif %}
{% if twofa_enabled %}
<!-- 2FA field if 2FA is enabled -->
<input type="hidden" name="user_id" value="{{ user_id }}">
<div class="mb-4">
<label class="form-label">Two-Factor Authentication Code</label>
<input type="password" autofocus id="twofa_code" name="twofa_code" class="form-control" required placeholder="Enter your 2FA code">
</div>
{% endif %}
<!-- Display error messages -->
{% if error_message %}
<div class="mb-3 text-danger">
{{ error_message }}
</div>
{% endif %}
<button class="btn btn-primary btn-sign" type="submit">Reset Password</button>
<label class="form-label d-flex mt-3 justify-content-between"><a href="/login" tabindex="-1">← Back to login
</a></label>
</form>
</div><!-- card-body -->
</div><!-- card -->
{% endif %}
<script src="/static/lib/jquery/jquery.min.js"></script>
<script src="/static/lib/bootstrap/js/bootstrap.bundle.min.js"></script>
<script>
'use script'
var skinMode = localStorage.getItem('skin-mode');
if(skinMode) {
$('html').attr('data-skin', 'dark');
}
</script>
</body>
</html>