diff --git a/scipost/templates/scipost/_remark_li.html b/scipost/templates/scipost/_remark_li.html index a34b3868b135bf723a912254b8796442f73a69fb..bf4fc637bfa4e178de1615f9d492a0681fd8cc4f 100644 --- a/scipost/templates/scipost/_remark_li.html +++ b/scipost/templates/scipost/_remark_li.html @@ -1,4 +1,4 @@ -<li> +<li id="{{remark.id}}"> <div class="font-weight-bold"> {{remark.contributor.user.first_name}} {{remark.contributor.user.last_name}} <small class="text-muted">on {{remark.date}}</small> </div> diff --git a/submissions/templates/submissions/_recommendation_author_content.html b/submissions/templates/submissions/_recommendation_author_content.html index 81910707187a9782d3bba86e273143a5c7b71b86..cfbda0714ebfd86bfb0e8955a91bc7f6e288b411 100644 --- a/submissions/templates/submissions/_recommendation_author_content.html +++ b/submissions/templates/submissions/_recommendation_author_content.html @@ -11,9 +11,6 @@ <h3 class="pb-0">Requested changes</h3> <p class="pl-md-3">{{recommendation.requested_changes}}</p> - <h3 class="pb-0">Remarks for Editorial College</h3> - <p class="pl-md-3">{{recommendation.remarks_for_editorial_college}}</p> - {% block recommendation_before_recommendation %}{% endblock %} <h3 class="pb-0">Recommendation</h3> diff --git a/submissions/views.py b/submissions/views.py index b82aeebb2e1ac1c36012d61b675d19cfa30bc6ef..4ffee7fa8c882a8ec3ee06b41538fb5afc20363f 100644 --- a/submissions/views.py +++ b/submissions/views.py @@ -397,21 +397,18 @@ def add_remark(request, arxiv_identifier_w_vn_nr): """ submission = get_object_or_404(Submission.objects.get_pool(request.user), arxiv_identifier_w_vn_nr=arxiv_identifier_w_vn_nr) - if request.method == 'POST': - remark_form = RemarkForm(request.POST) - if remark_form.is_valid(): - remark = Remark(contributor=request.user.contributor, - submission=submission, - date=timezone.now(), - remark=remark_form.cleaned_data['remark']) - remark.save() - return redirect(reverse('submissions:pool')) - else: - errormessage = 'The form was invalidly filled.' - return render(request, 'scipost/error.html', {'errormessage': errormessage}) + + remark_form = RemarkForm(request.POST or None) + if remark_form.is_valid(): + remark = Remark(contributor=request.user.contributor, + submission=submission, + date=timezone.now(), + remark=remark_form.cleaned_data['remark']) + remark.save() + messages.success(request, 'Your remark has succesfully been posted') else: - errormessage = 'This view can only be posted to.' - return render(request, 'scipost/error.html', {'errormessage': errormessage}) + messages.warning(request, 'The form was invalidly filled.') + return redirect(reverse('submissions:pool')) @login_required