2018-12-26 16:03:26 +00:00
{% extends 'manage/general/master.twig' %}
{% from 'macros.twig' import container_title , pagination %}
{% from '_layout/input.twig' import input_csrf , input_text , input_checkbox , input_file , input_select %}
{% block manage_content %}
<div class="container">
2018-12-27 02:59:57 +00:00
{{ container_title ( '<i class="fas fa-shield-alt fa-fw"></i> IP Blacklist' ) }}
2018-12-26 16:03:26 +00:00
<div class="manage__description">
Here you can add or remove CIDR ranges to the IP Blacklist, these ranges are allowed to log into the site but cannot create accounts.
</div>
{% if notices | length > 0 %}
<div class="warning">
<div class="warning__content">
{% for notice in notices %}
{{ notice }}
{% endfor %}
</div>
</div>
{% endif %}
<div class="manage__blacklist">
2019-06-07 17:33:51 +00:00
<form action=" {{ url ( 'manage-general-blacklist' ) }} " method="post" class="manage__blacklist__form">
2019-06-10 15:21:53 +00:00
{{ input_csrf ( ) }}
2018-12-26 16:03:26 +00:00
<textarea name="blacklist[add]" class="input__textarea manage__blacklist__textarea" placeholder="Enter CIDR (subnet/mask), each line will be processed. Addresses without a mask will just be blacklisted alone."></textarea>
<button class="input__button input__button--save manage__blacklist__button">Add</button>
</form>
2019-06-07 17:33:51 +00:00
<form action=" {{ url ( 'manage-general-blacklist' ) }} " method="post" class="manage__blacklist__form">
2019-06-10 15:21:53 +00:00
{{ input_csrf ( ) }}
2018-12-26 16:03:26 +00:00
{{ input_select ( 'blacklist[remove][]' , blacklist , null , 'ip_cidr' , null , true , 'manage__blacklist__select' , {
'multiple': true,
'size': 10,
}) }}
<button class="input__button input__button--destroy manage__blacklist__button">Remove</button>
</form>
</div>
</div>
{% endblock %}