diff --git a/geocity/apps/submissions/templates/submissions/emails/submission_changed.txt b/geocity/apps/submissions/templates/submissions/emails/submission_changed.txt index 9f5ccd8ab..c17d15f2d 100644 --- a/geocity/apps/submissions/templates/submissions/emails/submission_changed.txt +++ b/geocity/apps/submissions/templates/submissions/emails/submission_changed.txt @@ -11,7 +11,6 @@ {% else %} {% translate "Vous pouvez la consulter sur le lien suivant" %}: {{ submission_url }} {% endif %} - {% translate "Avec nos meilleures salutations," %} {% if administrative_entity.custom_signature %} {{ administrative_entity.custom_signature }} diff --git a/geocity/apps/submissions/views.py b/geocity/apps/submissions/views.py index 548c13abb..586a1d662 100644 --- a/geocity/apps/submissions/views.py +++ b/geocity/apps/submissions/views.py @@ -1255,6 +1255,15 @@ def anonymous_submission(request): raise Http404 +def display_warning_message_for_awaiting_supplement_submission(request): + messages.warning( + request, + _( + "N'oubliez pas de renvoyer le formulaire une fois que vous aurez ajouté les compléments demandés." + ), + ) + + @redirect_bad_status_to_detail @login_required @user_passes_test(has_profile) @@ -1450,6 +1459,9 @@ def submission_fields(request, submission_id): if form_payment is not None: requires_online_payment = form_payment.requires_online_payment + if submission.status == models.Submission.STATUS_AWAITING_SUPPLEMENT: + display_warning_message_for_awaiting_supplement_submission(request) + if request.method == "POST": # Disable `required` fields validation to allow partial save form = forms.FieldsForm( @@ -1650,6 +1662,9 @@ def submission_appendices(request, submission_id): current_step_type=StepType.APPENDICES, ) + if submission.status == models.Submission.STATUS_AWAITING_SUPPLEMENT: + display_warning_message_for_awaiting_supplement_submission(request) + if request.method == "POST": form = forms.AppendicesForm( instance=submission, @@ -1703,6 +1718,9 @@ def submission_contacts(request, submission_id): request.POST or None, instance=submission ) + if submission.status == models.Submission.STATUS_AWAITING_SUPPLEMENT: + display_warning_message_for_awaiting_supplement_submission(request) + if request.method == "POST": formset = forms.get_submission_contacts_formset_initiated( submission, data=request.POST @@ -1777,6 +1795,9 @@ def submission_geo_time(request, submission_id): ).all(), ) + if submission.status == models.Submission.STATUS_AWAITING_SUPPLEMENT: + display_warning_message_for_awaiting_supplement_submission(request) + if request.method == "POST": if formset.is_valid(): with transaction.atomic(): @@ -1973,6 +1994,9 @@ def submission_submit(request, submission_id): if step.errors_count and step.url ] + if submission.status == models.Submission.STATUS_AWAITING_SUPPLEMENT: + display_warning_message_for_awaiting_supplement_submission(request) + if request.method == "POST": if incomplete_steps: raise SuspiciousOperation