diff --git a/hypha/apply/funds/templates/funds/applicationsubmission_form.html b/hypha/apply/funds/templates/funds/applicationsubmission_form.html index c7060b015bb1e5816f9826179fad360572f03ede..d9d38d521b083d06ae6465c1bf4b6a4b22ff0656 100644 --- a/hypha/apply/funds/templates/funds/applicationsubmission_form.html +++ b/hypha/apply/funds/templates/funds/applicationsubmission_form.html @@ -24,7 +24,7 @@ {% endif %} {% endfor %} {% for button_name, button_type, button_value in buttons %} - <input class="button button--submit button--top-space button--{{ button_type }}" type="submit" name="{{ button_name }}" value="{{ button_value }}" /> + <input class="button button--submit button--top-space button--{{ button_type }}" type="submit" name="{{ button_name }}" value="{{ button_value }}"{% if button_value == 'Save Draft' %} formnovalidate{% endif %}/> {% endfor %} </form> </div> diff --git a/hypha/apply/funds/views.py b/hypha/apply/funds/views.py index a7fec42b8d8222f887ebb4f8d7c2752c83427748..70229bcc0965e633d6fd38912510943e6589db5c 100644 --- a/hypha/apply/funds/views.py +++ b/hypha/apply/funds/views.py @@ -887,7 +887,8 @@ class BaseSubmissionEditView(UpdateView): return super().get_context_data(buttons=self.buttons(), **kwargs) def get_form_class(self): - return self.object.get_form_class() + draft = self.request.POST.get('save', False) + return self.object.get_form_class(draft) @method_decorator(staff_required, name='dispatch')