diff options
| author | rubenwardy <rw@rubenwardy.com> | 2019-01-04 17:57:00 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2019-01-04 17:57:00 +0000 |
| commit | fbf374ff5d72722d14f07cc4ee71a5182212db94 (patch) | |
| tree | 4a2748373013db133a93476e302b9b3aef133c92 /app/templates | |
| parent | a68ac9cb4d7d3bd46279cf202a423329fd035e0c (diff) | |
| download | cheatdb-fbf374ff5d72722d14f07cc4ee71a5182212db94.tar.xz | |
Add manual email support
Diffstat (limited to 'app/templates')
| -rw-r--r-- | app/templates/base.html | 2 | ||||
| -rw-r--r-- | app/templates/users/send_email.html | 18 | ||||
| -rw-r--r-- | app/templates/users/user_profile_page.html | 19 |
3 files changed, 38 insertions, 1 deletions
diff --git a/app/templates/base.html b/app/templates/base.html index e8d986a..09ca939 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -138,7 +138,7 @@ <link rel="stylesheet" type="text/css" href="/static/easymde.min.css"> <script> $("textarea.markdown").each(function() { - new EasyMDE({ element: this, hideIcons: ["image"] }); + new EasyMDE({ element: this, hideIcons: ["image"], forceSync: true }); }) </script> {% block scriptextra %}{% endblock %} diff --git a/app/templates/users/send_email.html b/app/templates/users/send_email.html new file mode 100644 index 0000000..d802c7d --- /dev/null +++ b/app/templates/users/send_email.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %} + Send Email +{% endblock %} + +{% block content %} +<h1>Send Email</h1> + +{% from "macros/forms.html" import render_field, render_submit_field %} +<form action="" method="POST" class="form" role="form"> + {{ form.hidden_tag() }} + {{ render_field(form.subject) }} + {{ render_field(form.text, fieldclass="form-control markdown") }} + {{ render_submit_field(form.submit) }} +</form> + +{% endblock %} diff --git a/app/templates/users/user_profile_page.html b/app/templates/users/user_profile_page.html index cdb9ad1..8fdca3f 100644 --- a/app/templates/users/user_profile_page.html +++ b/app/templates/users/user_profile_page.html @@ -65,6 +65,25 @@ {% endif %} </td> </tr> + {% if current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.MODERATOR) %} + <tr> + <td>Admin</td> + <td> + {% if user.email %} + <a class="btn btn-primary" href="{{ url_for('send_email_page', username=user.username) }}"> + Email + </a> + {% else %} + <a class="btn btn-primary disabled" + data-toggle="tooltip" data-placement="bottom" + title="No email address for user" + style="pointer-events: all;"> + Email + </a> + {% endif %} + </td> + </tr> + {% endif %} {% if user == current_user %} <tr> <td>Profile Picture:</td> |
