Add ability to send email in bulk

This commit is contained in:
rubenwardy
2020-12-05 19:38:16 +00:00
parent 683b855584
commit 3efda30b98
7 changed files with 107 additions and 39 deletions

View File

@@ -13,6 +13,7 @@
<a class="list-group-item list-group-item-action" href="{{ url_for('admin.license_list') }}">License Editor</a>
<a class="list-group-item list-group-item-action" href="{{ url_for('admin.version_list') }}">Version Editor</a>
<a class="list-group-item list-group-item-action" href="{{ url_for('admin.warning_list') }}">Warning Editor</a>
<a class="list-group-item list-group-item-action" href="{{ url_for('admin.send_bulk_email') }}">Send bulk email</a>
<a class="list-group-item list-group-item-action" href="{{ url_for('admin.switch_user') }}">Sign in as another user</a>
</div>
</div>

View File

@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block title %}
{{ _("Send bulk email") }}
{% endblock %}
{% block content %}
<h1>{{ self.title() }}</h1>
<p class="alert alert-danger">
<b>BE VERY CAREFUL.</b>
This will send an email to all users with email addresses.
</p>
{% 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

@@ -0,0 +1,18 @@
{% extends "base.html" %}
{% block title %}
{{ _("Send email to %(username)s", username=user.display_name) }}
{% endblock %}
{% block content %}
<h1>{{ self.title() }}</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 %}