Completed first-round updates for the email confirmation views.

This commit is contained in:
Matt Scott 2023-02-20 12:12:22 -05:00
parent f977a42cea
commit b3c80df674
2 changed files with 96 additions and 99 deletions

View File

@ -1,50 +1,51 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Email confirmation - {{ SITE_NAME }}</title> <title>Email Confirmation - {{ SITE_NAME }}</title>
<link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}"> <link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}">
<!-- Tell the browser to be responsive to screen width --> <!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
{% assets "css_login" -%} {% assets "css_login" -%}
<link rel="stylesheet" href="{{ ASSET_URL }}"> <link rel="stylesheet" href="{{ ASSET_URL }}">
{%- endassets %} {%- endassets %}
<![endif]--> <![endif]-->
</head> </head>
<body class="hold-transition register-page"> <body class="hold-transition register-page">
<section class="content"> <section class="content">
<div class="error-page"> <div class="error-page">
<div class="error-content"> <div class="error-content">
{% if status == 1 %} {% if status == 1 %}
<h3> <h3>
<i class="fa fa-thumbs-o-up text-success"></i> Email verification successful! <i class="fa fa-thumbs-o-up text-success"></i> Email verification successful!
</h3> </h3>
<p> <p>
You have confirmed your account. <a href="{{ url_for('index.login') }}">Click here</a> to login. You have confirmed your account. <a href="{{ url_for('index.login') }}">Click here</a> to login.
</p> </p>
{% elif status == 2 %} {% elif status == 2 %}
<h3> <h3>
<i class="fa fa-hand-stop-o text-info"></i> Already verified! <i class="fa fa-hand-stop-o text-info"></i> Already verified!
</h3> </h3>
<p> <p>
You have confirmed your account already. <a href="{{ url_for('index.login') }}">Click here</a> to login. You have confirmed your account already. <a href="{{ url_for('index.login') }}">Click here</a> to
login.
</p> </p>
{% else %} {% else %}
<h3> <h3>
<i class="fa fa-warning text-yellow"></i> Email verification failed! <i class="fa fa-warning text-yellow"></i> Email verification failed!
</h3> </h3>
<p> <p>
The confirmation link is invalid or has expired. <a href="{{ url_for('index.resend_confirmation_email') }}">Click here</a> if you want to resend a new link. The confirmation link is invalid or has expired. <a
href="{{ url_for('index.resend_confirmation_email') }}">Click here</a> if you want to resend a new
link.
</p> </p>
{% endif %} {% endif %}
</div>
<!-- /.error-content -->
</div> </div>
<!-- /.error-page --> <!-- /.error-content -->
</section> </div>
<!-- /.error-page -->
</section>
</body> </body>
</html> </html>

View File

@ -1,86 +1,82 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Resend a confirmation email - {{ SITE_NAME }}</title> <title>Resend Confirmation Email - {{ SITE_NAME }}</title>
<link rel="icon" href="/static/img/favicon.png"> <link rel="icon" href="/static/img/favicon.png">
<!-- Tell the browser to be responsive to screen width --> <!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
{% assets "css_login" -%} {% assets "css_login" -%}
<link rel="stylesheet" href="{{ ASSET_URL }}"> <link rel="stylesheet" href="{{ ASSET_URL }}">
{%- endassets %} {%- endassets %}
<![endif]--> <![endif]-->
</head> </head>
<body class="hold-transition register-page"> <body class="hold-transition register-page">
<div class="register-box"> <div class="register-box">
<div class="register-logo"> <div class="register-logo">
<a href="{{ url_for('index.index') }}"><b>PowerDNS</b>-Admin</a> <a href="{{ url_for('index.index') }}"><b>PowerDNS</b>-Admin</a>
</div> </div>
<div class="register-box-body"> <div class="register-box-body">
{% if error %} {% if error %}
<div class="alert alert-danger alert-dismissible"> <div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ error }} {{ error }}
</div> </div>
{% endif %} {% endif %}
<p> <p>
Enter your email address to get account confirmation link. Enter your email address to get account confirmation link.
</p> </p>
<form method="post" data-toggle="validator"> <form method="post" data-toggle="validator">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<div class="form-group has-feedback">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<input type="email" name="email" class="form-control" placeholder="Email address" data-error="Please input your email" required> <div class="form-group has-feedback">
<span class="glyphicon glyphicon-envelope form-control-feedback"></span> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<span class="help-block with-errors"></span> <input type="email" name="email" class="form-control" placeholder="Email address"
</div> data-error="Please input your email" required>
<div class="row"> <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
<div class="col-xs-4 pull-left"> <span class="help-block with-errors"></span>
<button type="button" class="btn btn-flat btn-block" id="button_back">Back</button> </div>
</div> <div class="row">
<div class="col-xs-4 pull-right"> <div class="col-xs-4 pull-left">
<button type="submit" class="btn btn-flat btn-primary btn-block">Resend</button> <button type="button" class="btn btn-flat btn-block" id="button_back">Back</button>
</div> </div>
<!-- /.col --> <div class="col-xs-4 pull-right">
</div> <button type="submit" class="btn btn-flat btn-primary btn-block">Resend</button>
<div class="form-group"> </div>
<p> <!-- /.col -->
{% if status == 0 %} </div>
<font color="red">Email not found!</font> <div class="form-group">
{% elif status == 1 %} <p>
<font color="red">Email already confirmed!</font> {% if status == 0 %}
{% elif status == 2 %} <font color="red">Email not found!</font>
<font color="green">Confirmation email sent!</font> {% elif status == 1 %}
{% endif %} <font color="red">Email already confirmed!</font>
</p> {% elif status == 2 %}
</div> <font color="green">Confirmation email sent!</font>
</form> {% endif %}
</p>
</div>
</form>
</div> </div>
<!-- /.form-box --> <!-- /.register-box-body -->
<div class="login-box-footer"> </div>
<center> <!-- /.register-box -->
<p>Powered by <a href="https://github.com/PowerDNS-Admin/PowerDNS-Admin">PowerDNS-Admin</a></p> <div class="text-center pt-3">
</center> <p>Powered by <a href="https://powerdnsadmin.org" target="_blank">PowerDNS-Admin</a></p>
</div> </div>
</div>
<!-- /.login-box -->
{% assets "js_login" -%} {% assets "js_login" -%}
<script type="text/javascript" src="{{ ASSET_URL }}"></script> <script type="text/javascript" src="{{ ASSET_URL }}"></script>
{%- endassets %} {%- endassets %}
{% assets "js_validation" -%} {% assets "js_validation" -%}
<script type="text/javascript" src="{{ ASSET_URL }}"></script> <script type="text/javascript" src="{{ ASSET_URL }}"></script>
{%- endassets %} {%- endassets %}
<script> <script>
$(function () { $(function () {
$('#button_back').click(function () { $('#button_back').click(function () {
window.location.href = '{{ url_for('index.login') }}'; window.location.href = '{{ url_for('index.login') }}';
}) })
}); });
</script> </script>
</body> </body>
</html>
</html>