Adds block and unblock functionality
This commit is contained in:
@ -4,6 +4,10 @@
|
||||
|
||||
{% block header %}
|
||||
{{ server.server_name }}
|
||||
|
||||
{% if server.status == "blocked" %}<span class="icon icon-x has-text-danger is-size-5" title="{% trans 'Blocked' %}"><span class="is-sr-only">{% trans "Blocked" %}</span></span>
|
||||
{% endif %}
|
||||
|
||||
<a href="{% url 'settings-federation' %}" class="has-text-weight-normal help">{% trans "Back to server list" %}</a>
|
||||
{% endblock %}
|
||||
|
||||
@ -64,5 +68,17 @@
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section class="block content">
|
||||
<h2 class="title is-4">{% trans "Actions" %}</h2>
|
||||
<form class="block" method="post" action="{% url 'settings-federated-server' server.id %}">
|
||||
{% csrf_token %}
|
||||
{% if server.status != 'blocked' %}
|
||||
<button class="button is-danger">{% trans "Block" %}</button>
|
||||
{% else %}
|
||||
<button class="button">{% trans "Un-block" %}</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
Reference in New Issue
Block a user