diff --git a/docs/setup/administrators/configuration.md b/docs/setup/administrators/configuration.md index 59aa689c68..7a3e7cf978 100644 --- a/docs/setup/administrators/configuration.md +++ b/docs/setup/administrators/configuration.md @@ -112,7 +112,11 @@ If applicants should be forced to preview their application before submitting ---- -Set the allowed file extension for all uploads fields. +### Allow Withdrawing of Submissions + + ENABLE_SUBMISSION_WITHDRAWAL = env.bool('ENABLE_SUBMISSION_WITHDRAWAL', False) + +### Set the allowed file extension for all uploads fields. FILE_ALLOWED_EXTENSIONS = ['doc', 'docx', 'odp', 'ods', 'odt', 'pdf', 'ppt', 'pptx', 'rtf', 'txt', 'xls', 'xlsx'] FILE_ACCEPT_ATTR_VALUE = ', '.join(['.' + ext for ext in FILE_ALLOWED_EXTENSIONS]) diff --git a/hypha/apply/funds/models/submissions.py b/hypha/apply/funds/models/submissions.py index 6bf73d5909..b9bb1727be 100644 --- a/hypha/apply/funds/models/submissions.py +++ b/hypha/apply/funds/models/submissions.py @@ -944,7 +944,8 @@ def in_external_review_phase(self): def is_finished(self): accepted = self.status in PHASES_MAPPING["accepted"]["statuses"] dismissed = self.status in PHASES_MAPPING["dismissed"]["statuses"] - return accepted or dismissed + withdrawn = self.status in PHASES_MAPPING["withdrawn"]["statuses"] + return accepted or dismissed or withdrawn # Methods for accessing data on the submission diff --git a/hypha/apply/funds/templates/funds/applicationsubmission_confirm_withdraw.html b/hypha/apply/funds/templates/funds/applicationsubmission_confirm_withdraw.html new file mode 100644 index 0000000000..396081fdbe --- /dev/null +++ b/hypha/apply/funds/templates/funds/applicationsubmission_confirm_withdraw.html @@ -0,0 +1,23 @@ +{% extends "base-apply.html" %} +{% load i18n static %} + +{% block title %}{% trans "Withdrawing" %}: {{object.title }}{% endblock %} + +{% block content %} +
+ + + +{% endblock %} diff --git a/hypha/apply/funds/templates/funds/applicationsubmission_detail.html b/hypha/apply/funds/templates/funds/applicationsubmission_detail.html index 06945383a2..f3d26c4fa5 100644 --- a/hypha/apply/funds/templates/funds/applicationsubmission_detail.html +++ b/hypha/apply/funds/templates/funds/applicationsubmission_detail.html @@ -137,6 +137,14 @@