moviewyrm/bookwyrm/templates/settings/email_blocklist/email_blocklist.html

66 lines
2.2 KiB
HTML
Raw Normal View History

2021-09-08 21:32:11 +00:00
{% extends 'settings/layout.html' %}
{% load i18n %}
2021-09-08 22:30:18 +00:00
{% load humanize %}
2021-09-08 21:32:11 +00:00
{% block title %}{% trans "Email Blocklist" %}{% endblock %}
{% block header %}{% trans "Email Blocklist" %}{% endblock %}
{% block edit-button %}
2021-09-08 22:08:22 +00:00
{% trans "Add domain" as button_text %}
{% include 'snippets/toggle/open_button.html' with controls_text="add_domain" icon_with_text="plus" text=button_text focus="add_domain_header" %}
2021-09-08 21:32:11 +00:00
{% endblock %}
{% block panel %}
2021-09-28 19:26:55 +00:00
{% include 'settings/email_blocklist/domain_form.html' with controls_text="add_domain" class="block" %}
2021-09-08 22:08:22 +00:00
<p class="notification block">
{% trans "When someone tries to register with an email from this domain, no account will be created. The registration process will appear to have worked." %}
</p>
2021-09-08 22:30:18 +00:00
<table class="table is-striped is-fullwidth">
2021-09-08 21:32:11 +00:00
<tr>
{% url 'settings-federation' as url %}
<th>
2021-09-12 17:10:21 +00:00
{% trans "Domain" %}
2021-09-08 21:32:11 +00:00
</th>
2021-09-12 17:10:21 +00:00
<th>{% trans "Users" %}</th>
2021-09-08 21:32:11 +00:00
<th>
{% trans "Options" %}
</th>
</tr>
2021-09-08 22:08:22 +00:00
{% for domain in domains %}
2021-09-08 21:32:11 +00:00
<tr>
2021-09-08 22:08:22 +00:00
<td>{{ domain.domain }}</td>
2021-09-08 22:30:18 +00:00
<td>
<a href="{% url 'settings-users' %}?email=@{{ domain.domain }}">
{% with user_count=domain.users.count %}
{% blocktrans trimmed count conter=user_count with display_count=user_count|intcomma %}
{{ display_count }} user
{% plural %}
{{ display_count }} users
{% endblocktrans %}
{% endwith %}
</a>
2021-09-08 22:49:52 +00:00
</td>
2021-09-08 21:32:11 +00:00
<td>
2021-09-08 23:24:13 +00:00
<form name="remove-{{ domain.id }}" action="{% url 'settings-email-blocks-delete' domain.id %}" method="post">
{% csrf_token %}
{% trans "Delete" as button_text %}
<button class="button" type="submit">
<span class="icon icon-x" title="{{ button_text }}" aria-hidden="true"></span>
<span class="is-hidden-mobile">{{ button_text }}</span>
</button>
</form>
2021-09-08 21:32:11 +00:00
</td>
</tr>
2021-09-08 22:08:22 +00:00
{% endfor %}
2021-09-28 20:18:27 +00:00
{% if not domains.exists %}
<tr><td colspan="5"><em>{% trans "No email domains currently blocked" %}</em></td></tr>
{% endif %}
2021-09-08 21:32:11 +00:00
</table>
2021-09-28 20:05:45 +00:00
2021-09-08 21:32:11 +00:00
{% endblock %}