aboutsummaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-05-14 00:40:34 +0100
committerrubenwardy <rw@rubenwardy.com>2018-05-14 00:40:34 +0100
commit73fa5d11866e1ab36463c3a773b8ca0d3671a709 (patch)
treee1e21333d32746d1a3c02d81033f7561779672b0 /app/templates
parentacc48c72620fe9bfdf3c72666d57af7e3c9306d0 (diff)
downloadcheatdb-73fa5d11866e1ab36463c3a773b8ca0d3671a709.tar.xz
Add email support
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/emails/verify.html17
-rw-r--r--app/templates/users/user_profile_page.html26
2 files changed, 23 insertions, 20 deletions
diff --git a/app/templates/emails/verify.html b/app/templates/emails/verify.html
new file mode 100644
index 0000000..a08b174
--- /dev/null
+++ b/app/templates/emails/verify.html
@@ -0,0 +1,17 @@
+<h1>Hello!</h1>
+
+<p>
+ This email has been sent to you because someone (hopefully you)
+ has entered your email address as a user's email.
+</p>
+
+<p>
+ If this was you, then please click this link to verify the address:
+ <a href="{{ url_for('verify_email_page', token=token, _external=True) }}">
+ {{ url_for('verify_email_page', token=token, _external=True) }}
+ </a>
+</p>
+
+<p>
+ If it wasn't you, then just delete this email.
+</p>
diff --git a/app/templates/users/user_profile_page.html b/app/templates/users/user_profile_page.html
index 7e280e1..2d429f1 100644
--- a/app/templates/users/user_profile_page.html
+++ b/app/templates/users/user_profile_page.html
@@ -42,24 +42,6 @@
{% endif %}
</td>
</tr>
- {% if user == current_user %}
- <tr>
- <td>Email:</td>
- <td>
- {{ user.email }} |
- <a href="">{% if user.email %}change{% else %}add{% endif %}</a>
- &#x1f512;
- </td>
- </tr>
- <tr>
- <td>Password:</td>
- <td>
- <a href="{{ url_for('user.change_password') }}">
- {% if user.password %}Change password{% else %}Add password{% endif %}
- </a> &#x1f512;
- </td>
- </tr>
- {% endif %}
</table>
</div>
@@ -90,10 +72,14 @@
<div class="col-sm-6 col-md-5 col-lg-4">
{{ form.hidden_tag() }}
- {{ render_field(form.display_name, tabindex=240) }}
+ {{ render_field(form.display_name, tabindex=230) }}
+
+ {% if user.checkPerm(current_user, "CHANGE_EMAIL") %}
+ {{ render_field(form.email, tabindex=240) }}
+ {% endif %}
{% if user.checkPerm(current_user, "CHANGE_RANK") %}
- {{ render_field(form.rank, tabindex=240) }}
+ {{ render_field(form.rank, tabindex=250) }}
{% endif %}
{{ render_submit_field(form.submit, tabindex=280) }}