Fix the blacklist forms, restricted access to disable users

This commit is contained in:
2011-12-05 21:42:57 +00:00
parent fffe08b0b0
commit 01b161166c
3 changed files with 27 additions and 15 deletions

View File

@@ -3,24 +3,30 @@
{% block title %}Blacklist User{% endblock %}
{% block content %}
<h1>Add Blacklist</h1>
<div class="page-header">
<h1>Add Blacklist</h1>
</div>
<p>This form will blacklist the listed user below. It'll process all entries for the user and blacklist the following:</p>
<ul>
<li>EVE API Keys</li>
<li>Characters</li>
<li>Email Addresses</li>
{% if "reddit"|installed %}
<li>Reddit Accounts</li>
{% endif %}
<li>EVE API Keys</li>
<li>Characters</li>
<li>Email Addresses</li>
{% if "reddit"|installed %}<li>Reddit Accounts</li>{% endif %}
</ul>
<form action="{% url hr-blacklistuser blacklistuser.id %}" method="post">
<table>
<tr><th><label>User:</label></th><td>{{ blacklistuser.username }}</td></tr>
{{ form.as_table }}
</table>
{% csrf_token %}
<input type="submit" value="Blacklist" />
<fieldset>
<div class="clearfix">
<label for="u">User</label>
<div class="input"><input id="u" value="{{ blacklistuser.username }}" disabled="true"/></div>
</div>
{% include "formtools/formfield.html" with field=form.level %}
{% include "formtools/formfield.html" with field=form.reason class="xxlarge" %}
{% include "formtools/formfield.html" with field=form.expiry_date %}
{% include "formtools/formfield.html" with field=form.disable %}
{% csrf_token %}
<input type="submit" value="Blacklist" class="btn error"/>
</fieldset>
</form>
{% endblock %}

View File

@@ -36,7 +36,7 @@
<ul>
<li class="prev{% if not page_obj.has_previous %} disabled{% endif %}"><a href="{% if page_obj.has_previous %}?page={{ page_obj.previous_page_number }}{% endif %}">Previous</a></li>
{% for i in paginator.page_range %}
<li{% if i == page.number %} class="active"{% endif %}><a href="?page={{ i }}">{{ i }}</a></li>
<li{% if i == page_obj.number %} class="active"{% endif %}><a href="?page={{ i }}">{{ i }}</a></li>
{% endfor %}
<li class="next{% if not page_obj.has_next %} disabled{% endif %}"><a href="{% if page_obj.has_next %}?page={{page_obj.next_page_number }}{% endif %}">Next</a>
</ul>