Skip to content

Commit

Permalink
Disable submission preview until a fix for the bugs are in place. (#3789
Browse files Browse the repository at this point in the history
)

Related #3788

Sets `SUBMISSION_PREVIEW_REQUIRED` to False by default and hides the
submission preview buttons.

We need a permanent fix for the preview bugs but until then this hides
the functionality.
  • Loading branch information
frjo authored Feb 29, 2024
1 parent bec2899 commit b1d9261
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion hypha/apply/funds/templates/funds/application_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ <h3>{% blocktrans %}Sorry this {{ page|verbose_name }} is not accepting applicat
<button class="button button--submit button--primary" type="submit" disabled>{% trans "Submit for review" %}</button>
{% endif %}
<button class="button button--submit button--white" type="submit" name="draft" value="Save draft" formnovalidate>{% trans "Save draft" %}</button>
{% if not require_preview and request.user.is_authenticated %}
# TODO Fix preview bugs before reactivating.
{% if False and not require_preview and request.user.is_authenticated %}
<button class="button button--submit button--white" type="submit" name="preview">{% trans "Preview" %}</button>
{% endif %}
</div>
Expand Down
3 changes: 2 additions & 1 deletion hypha/apply/funds/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,8 @@ def buttons(self):
else:
yield ("submit", "primary", _("Submit"))
yield ("save", "white", _("Save draft"))
yield ("preview", "white", _("Preview"))
# TODO Fix preview bugs before reactivating.
# yield ("preview", "white", _("Preview"))

def get_form_kwargs(self):
"""
Expand Down
3 changes: 2 additions & 1 deletion hypha/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@
REVIEW_VISIBILITY_DEFAULT = env.str("REVIEW_VISIBILITY_DEFAULT", "private")

# Require an applicant to view their rendered application before submitting
SUBMISSION_PREVIEW_REQUIRED = env.bool("SUBMISSION_PREVIEW_REQUIRED", True)
# TODO Fix preview bugs before setting this to True as default.
SUBMISSION_PREVIEW_REQUIRED = env.bool("SUBMISSION_PREVIEW_REQUIRED", False)

# Project settings.

Expand Down

0 comments on commit b1d9261

Please sign in to comment.