SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit e81a827e authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Update templates for new reportform

parent 2fa47934
No related branches found
No related tags found
No related merge requests found
{% extends 'scipost/base.html' %}
{% block pagetitle %}: submit report (ack){% endblock pagetitle %}
{% block bodysup %}
<section>
{% if errormessage %}
<p>{{ errormessage }}</p>
{% else %}
<h1>Thank you for your Report.</h1>
{% endif %}
</section>
{% endblock bodysup %}
...@@ -8,18 +8,15 @@ ...@@ -8,18 +8,15 @@
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
$('#refusal').hide();
$('[name="action_option"]').on('change', function() { $('[name="action_option"]').on('change', function() {
if ($('#id_action_option_1').is(':checked')) { if ($('[name="action_option"][value="refuse"]').is(':checked')) {
$('#refusal').show(); $('#refusal').show();
} }
else { else {
$('#refusal').hide(); $('#refusal').hide();
} }
}); }).trigger('change');
}); });
</script> </script>
{% endblock headsup %} {% endblock headsup %}
...@@ -36,6 +33,7 @@ $(document).ready(function(){ ...@@ -36,6 +33,7 @@ $(document).ready(function(){
<div class="col-12"> <div class="col-12">
{% if not report_to_vet %} {% if not report_to_vet %}
<h1>There are no Reports for you to vet.</h1> <h1>There are no Reports for you to vet.</h1>
<p>Go back to my <a href="{% url 'scipost:personal_page' %}">personal page</a>.</p>
{% else %} {% else %}
<h1 class="highlight">SciPost Report to vet:</h1> <h1 class="highlight">SciPost Report to vet:</h1>
...@@ -52,8 +50,9 @@ $(document).ready(function(){ ...@@ -52,8 +50,9 @@ $(document).ready(function(){
<hr class="small"> <hr class="small">
<h2>Please vet this Report:</h2> <h2>Please vet this Report:</h2>
<form action="{% url 'submissions:vet_submitted_report_ack' report_id=report_to_vet.id %}" method="post"> <form action="{% url 'submissions:vet_submitted_reports' %}" method="post">
{% csrf_token %} {% csrf_token %}
{{ form.report }}
{{ form.action_option|bootstrap }} {{ form.action_option|bootstrap }}
<div class="col-md-6" id="refusal"> <div class="col-md-6" id="refusal">
{{ form.refusal_reason|bootstrap }} {{ form.refusal_reason|bootstrap }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment