Add manual email support

This commit is contained in:
rubenwardy
2019-01-04 17:57:00 +00:00
parent a68ac9cb4d
commit fbf374ff5d
5 changed files with 72 additions and 5 deletions

View File

@@ -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 %}

View File

@@ -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>