diff --git a/submissions/forms.py b/submissions/forms.py index c9f3ac6365fe421f3190a1e5bde3cc4f2311c476..4e3ce90c71a556a1256687dbdb28a17590043237 100644 --- a/submissions/forms.py +++ b/submissions/forms.py @@ -519,6 +519,8 @@ class ReportPDFForm(forms.ModelForm): class ReportForm(forms.ModelForm): + report_type = REPORT_NORMAL + class Meta: model = Report fields = ['qualification', 'strengths', 'weaknesses', 'report', 'requested_changes', @@ -582,8 +584,6 @@ class ReportForm(forms.ModelForm): if self.submission.status in POST_PUBLICATION_STATUSES: self.report_type = REPORT_POST_PUBLICATION - else: - self.report_type = REPORT_NORMAL def save(self): """ @@ -591,6 +591,7 @@ class ReportForm(forms.ModelForm): Possibly overwrite the default status if user asks for saving as draft. """ report = super().save(commit=False) + report.report_type = self.report_type report.submission = self.submission report.date_submitted = timezone.now() diff --git a/submissions/templates/submissions/_single_public_report_without_comments.html b/submissions/templates/submissions/_single_public_report_without_comments.html index cd14902fb992c60cbd8637ef23a32ae738648149..1d268af9da4dcb7d805062a8c926035fcb73b890 100644 --- a/submissions/templates/submissions/_single_public_report_without_comments.html +++ b/submissions/templates/submissions/_single_public_report_without_comments.html @@ -10,6 +10,9 @@ <h3> {% if report.anonymous %}(chose public anonymity) {% endif %}<a href="{{report.author.get_absolute_url}}">{{ report.author.user.first_name }} {{ report.author.user.last_name }}</a> on {{ report.date_submitted|date:'Y-n-j' }} + {% if report.report_type == 'report_post_pub' %} + <small><label class="label label-outline-primary ml-2">Post-publication Report</label></small> + {% endif %} </h3> {% if report.doi_string or report.pdf_report %} <ul class="clickables"> @@ -63,7 +66,10 @@ <div class="reportid"> <h3> {% if report.anonymous %}Anonymous Report {{report.report_nr}}{% else %}<a href="{{report.author.get_absolute_url}}">{{ report.author.user.first_name }} {{ report.author.user.last_name }}</a>{% endif %} - on {{ report.date_submitted|date:'Y-n-j' }}</h3> + on {{ report.date_submitted|date:'Y-n-j' }} + {% if report.report_type == 'report_post_pub' %} + <small><label class="label label-outline-primary ml-2">Post-publication Report</label></small> + {% endif %} </h3> {% if report.doi_string or report.pdf_report %} <ul class="clickables"> diff --git a/submissions/templates/submissions/submit_report.html b/submissions/templates/submissions/submit_report.html index b7e1b97a5a3c44db682715e6973020feb67d73ee..dbfc759f8109e32c0af560aaa818a555ad83512c 100644 --- a/submissions/templates/submissions/submit_report.html +++ b/submissions/templates/submissions/submit_report.html @@ -82,9 +82,6 @@ <div class="card card-grey"> <div class="card-body"> <h1>Your {% if form.instance.is_followup_report %}followup {% endif %}report:</h1> - {% if form.report_type == 'report_post_pub' %} - <p class="text-warning">The Editorial Recommendation for this Submission has already been formulated. Therefore, your report will be flagged as <label class="label label-outline-warning">Post-publication Report</label>.</p> - {% endif %} <p>A preview of text areas will appear below as you type (you can use LaTeX \$...\$ for in-text equations or \ [ ... \ ] for on-line equations).</p> <p class="mb-0">Any fields with an asterisk (*) are required.</p> {% if form.instance.is_followup_report %} @@ -94,12 +91,24 @@ {% endif %} </div> </div> + {% if form.report_type == 'report_post_pub' %} + <div class="card border-warning my-4"> + <div class="card-body">The Editorial Recommendation for this Submission has already been formulated. Therefore, your report will be flagged as <label class="label label-warning">Post-publication Report</label>. + </div> + </div> + {% endif %} <form action="{% url 'submissions:submit_report' arxiv_identifier_w_vn_nr=submission.arxiv_identifier_w_vn_nr %}" method="post"> {% csrf_token %} {{ form|bootstrap:'3,9' }} <p>Any fields with an asterisk (*) are required.</p> <input class="btn btn-primary" type="submit" name="save_submit" value="Submit your report"/> <input class="btn btn-secondary ml-2" type="submit" name="save_draft" value="Save your report as draft"/> + {% if form.report_type == 'report_post_pub' %} + <div class="card border-warning mt-4"> + <div class="card-body">The Editorial Recommendation for this Submission has already been formulated. Therefore, your report will be flagged as <label class="label label-warning">Post-publication Report</label>. + </div> + </div> + {% endif %} <div class="my-4"> <em>By clicking on Submit, you state that you abide by the <a href="{% url 'journals:journals_terms_and_conditions' %}#referee_code_of_conduct">referee code of conduct</a>.</em> </div>