Fix email confirmation template

This commit is contained in:
Khanh Ngo 2020-05-17 16:11:52 +07:00
parent edb2a354d1
commit ab7e1eb71b
No known key found for this signature in database
GPG Key ID: D5FAA6A16150E49E
2 changed files with 118 additions and 66 deletions

View File

@ -1,40 +1,50 @@
{% extends "base.html" %} <!DOCTYPE html>
{% block title %}<title>Email verification - {{ SITE_NAME }}</title>{% endblock %} <html>
{% block dashboard_stat %} <head>
{% endblock %} <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Email confirmation - {{ SITE_NAME }}</title>
<link rel="icon" href="/static/img/favicon.png">
<!-- 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">
{% assets "css_login" -%}
<link rel="stylesheet" href="{{ ASSET_URL }}">
{%- endassets %}
<![endif]-->
</head>
{% block content %} <body class="hold-transition register-page">
<!-- Main content --> <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-content --> <!-- /.error-page -->
</div> </section>
<!-- /.error-page --> </body>
</section>
<!-- /.content --> </html>
{% endblock %}

View File

@ -1,30 +1,52 @@
{% extends "base.html" %} <!DOCTYPE html>
{% block title %}<title>Resend confirmation email - {{ SITE_NAME }}</title>{% endblock %} <html>
{% block dashboard_stat %} <head>
{% endblock %} <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Resend a confirmation email - {{ SITE_NAME }}</title>
<link rel="icon" href="/static/img/favicon.png">
<!-- 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">
{% assets "css_login" -%}
<link rel="stylesheet" href="{{ ASSET_URL }}">
{%- endassets %}
<![endif]-->
</head>
{% block content %} <body class="hold-transition register-page">
<!-- Main content --> <div class="register-box">
<section class="content"> <div class="register-logo">
<div class="error-page"> <a href="{{ url_for('index.index') }}"><b>PowerDNS</b>-Admin</a>
<div class="error-content"> </div>
<h3> <div class="register-box-body">
<i class="fa fa-hand-o-right text-info"></i> Resend a confirmation email {% if error %}
</h3> <div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ error }}
</div>
{% endif %}
<p> <p>
Enter your email address to get new account confirmation link. Enter your email address to get account confirmation link.
</p> </p>
<form class="search-form" method="post"> <form method="post" data-toggle="validator">
<div class="input-group"> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}"> <div class="form-group has-feedback">
<input type="text" name="email" class="form-control" placeholder="Email address" data-error="Please input your email" required> <input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
<div class="input-group-btn"> <input type="email" name="email" class="form-control" placeholder="Email address" data-error="Please input your email" required>
<button type="submit" name="submit" class="btn btn-success btn-flat"><i class="fa fa-mail-reply"></i> <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</button> <span class="help-block with-errors"></span>
</div> </div>
</div> <div class="row">
<!-- /.input-group --> <div class="col-xs-4 pull-left">
<button type="button" class="btn btn-flat btn-block" id="button_back">Back</button>
</div>
<div class="col-xs-4 pull-right">
<button type="submit" class="btn btn-flat btn-primary btn-block">Resend</button>
</div>
<!-- /.col -->
</div>
<div class="form-group">
<p> <p>
{% if status == 0 %} {% if status == 0 %}
<font color="red">Email not found!</font> <font color="red">Email not found!</font>
@ -34,11 +56,31 @@
<font color="green">Confirmation email sent!</font> <font color="green">Confirmation email sent!</font>
{% endif %} {% endif %}
</p> </p>
</form>
</div> </div>
<!-- /.error-content --> </form>
</div> </div>
<!-- /.error-page --> <!-- /.form-box -->
</section> <div class="login-box-footer">
<!-- /.content --> <center>
{% endblock %} <p>Powered by <a href="https://github.com/ngoduykhanh/PowerDNS-Admin">PowerDNS-Admin</a></p>
</center>
</div>
</div>
<!-- /.login-box -->
{% assets "js_login" -%}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
{%- endassets %}
{% assets "js_validation" -%}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
{%- endassets %}
<script>
$(function () {
$('#button_back').click(function () {
window.location.href = '{{ url_for('index.login') }}';
})
});
</script>
</body>
</html>