aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin')
-rw-r--r--mediagoblin/static/js/setup_report_forms.js14
-rw-r--r--mediagoblin/templates/mediagoblin/moderation/report.html30
2 files changed, 20 insertions, 24 deletions
diff --git a/mediagoblin/static/js/setup_report_forms.js b/mediagoblin/static/js/setup_report_forms.js
index a75a92dd..57a4789c 100644
--- a/mediagoblin/static/js/setup_report_forms.js
+++ b/mediagoblin/static/js/setup_report_forms.js
@@ -24,14 +24,12 @@ function init_report_resolution_form() {
}
init_user_banned_form();
$('form#resolution_form').hide()
- $('#open_resolution_form').click(function() {
- $('form#resolution_form').toggle();
- $.each(hidden_input_names, function(key, list){
- $.each(list, function(index, name){
- $('label[for='+name+']').hide();
- $('#'+name).hide();
- });
- });
+ $('form#resolution_form').toggle();
+ $.each(hidden_input_names, function(key, list){
+ $.each(list, function(index, name){
+ $('label[for='+name+']').hide();
+ $('#'+name).hide();
+ });
});
$('#action_to_resolve').change(function() {
$('ul#action_to_resolve li input:checked').each(function() {
diff --git a/mediagoblin/templates/mediagoblin/moderation/report.html b/mediagoblin/templates/mediagoblin/moderation/report.html
index efd1adae..12ff9a6b 100644
--- a/mediagoblin/templates/mediagoblin/moderation/report.html
+++ b/mediagoblin/templates/mediagoblin/moderation/report.html
@@ -128,21 +128,7 @@
{{ report.report_content }}
</div>
</div>
- {% if not report.is_archived_report() and
- not (report.reported_user.has_privilege('admin') and
- not request.user.has_privilege('admin')) %}
- <input type=button class="button_action" value="{% trans %}Resolve{% endtrans %}" id=open_resolution_form />
- <form action="" method="POST" id=resolution_form>
- {{ wtforms_util.render_divs(form) }}
- {{ csrf_token }}
- <input type=submit class="button_action_highlight" id="submit_this_report" value="{% trans %}Resolve This Report{% endtrans %}"/>
- </form>
- <script>
- $(document).ready(function() {
- init_report_resolution_form();
- });
- </script>
- {% elif report.is_archived_report() %}
+ {% if report.is_archived_report() %}
<h2><img src="{{ request.staticdirect('/images/icon_clipboard.png') }}"
alt=""
title="Under a GNU LGPL v.3 or Creative Commons BY-SA 3.0 license.
@@ -154,13 +140,25 @@
<pre>
<p>{{ report.result }}</p>
</pre>
- {% else %}
+ {% elif report.reported_user.has_privilege('admin')
+ and not request.user.has_privilege('admin') %}
<input type=button disabled=disabled value="{% trans %}Resolve This Report{% endtrans %}"/>
<p>
{% trans -%}
You cannot take action against an administrator
{%- endtrans %}
</p>
+ {% else %}
+ <form action="" method="POST" id=resolution_form>
+ {{ wtforms_util.render_divs(form) }}
+ {{ csrf_token }}
+ <input type=submit class="button_action_highlight" id="submit_this_report" value="{% trans %}Resolve This Report{% endtrans %}"/>
+ </form>
+ <script>
+ $(document).ready(function() {
+ init_report_resolution_form();
+ });
+ </script>
{% endif %}
{% endif %}
{% endblock %}