Commit 0648fb5f authored by Guillaume Mella's avatar Guillaume Mella
Browse files

do not show error toggle button when no problem is present

parent 97e97605
{% if entries %}
{% if has_problem %}
<a onclick="$(&quot;.erroronly&quot;).toggleClass(&quot;hidden&quot;);" class="dt-button"><span class="erroronly btn btn-warning btn-xs hidden">show all</span><span class="erroronly btn btn-success btn-xs">show error only</span></a>
{% endif %}
<div class="entry-info">
{% for entry in entries %}
{% if entry.entry.warnings or entry.entry.errors or not entry.entry.unique %}
......
......@@ -34,7 +34,7 @@ def send_email_to_moderator(settings, moderate_url):
# TODO: change the mail subject
message = Message(subject="there is one submission to moderate", sender=sender,
recipients=[moderator],
body="There is a new submission at JMDC, moderation can be done here : \n %s \nRegards!"%moderate_url)
body="There is a new submission at JMDC, moderation can be done here : \n %s \nRegards!"%moderate_url)
mailer = Mailer.from_settings(settings)
mailer.send(message)
......@@ -211,6 +211,7 @@ def moderate_submission(request):
if k not in problem_fields:
problem_fields.append(k)
problem_fields.sort()
context['has_problem'] = True
entry['problem_fields'] = problem_fields
entries.append({'line': e.line_number-1, 'entry': entry})
context['entries'] = entries
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment