diff --git a/opentech/apply/funds/templates/funds/base_submissions_table.html b/opentech/apply/funds/templates/funds/base_submissions_table.html index 41e9256ea4c15e28caf36130e93c45ede128395b..d9214f80da196c86ca5211367455a9e292fd1bac 100644 --- a/opentech/apply/funds/templates/funds/base_submissions_table.html +++ b/opentech/apply/funds/templates/funds/base_submissions_table.html @@ -8,8 +8,7 @@ {% block content %} {% block table %} - - {% include "funds/includes/table_filter_and_search.html" with filter_form=filter_form search_term=search_term use_search=True%} + {% include "funds/includes/table_filter_and_search.html" with filter_form=filter_form search_term=search_term use_search=True filter_action=filter_action %} {% render_table table %} {% endblock %} diff --git a/opentech/apply/funds/templates/funds/includes/table_filter_and_search.html b/opentech/apply/funds/templates/funds/includes/table_filter_and_search.html index 3f75c443729cc802796309d7c2238955de2af8af..e4cff0f2d2f2147b94009bcebc63f27aefbe9f7f 100644 --- a/opentech/apply/funds/templates/funds/includes/table_filter_and_search.html +++ b/opentech/apply/funds/templates/funds/includes/table_filter_and_search.html @@ -18,7 +18,7 @@ <button class="filters__button js-close-filters">Close</button> </div> - <form action="" method="get" class="form form--filters js-filter-form"> + <form action="{{ filter_action }}" method="get" class="form form--filters js-filter-form"> <ul class="form__filters select2"> {{ filter.form.as_ul }} <li> diff --git a/opentech/apply/funds/views.py b/opentech/apply/funds/views.py index df9c8a1eb14da981933940e87144014a2db30874..84ca433809bc03dd2e898222c35f48cb8d872923 100644 --- a/opentech/apply/funds/views.py +++ b/opentech/apply/funds/views.py @@ -46,6 +46,7 @@ from .workflow import STAGE_CHANGE_ACTIONS class BaseAdminSubmissionsTable(SingleTableMixin, FilterView): table_class = AdminSubmissionsTable filterset_class = SubmissionFilterAndSearch + filter_action = '' excluded_fields = [] @@ -72,6 +73,7 @@ class BaseAdminSubmissionsTable(SingleTableMixin, FilterView): search_term = self.request.GET.get('query') kwargs.update( search_term=search_term, + filter_action=self.filter_action, ) return super().get_context_data(**kwargs) @@ -81,6 +83,7 @@ class SubmissionListView(AllActivityContextMixin, BaseAdminSubmissionsTable): template_name = 'funds/submissions.html' table_class = SummarySubmissionsTable table_pagination = False + filter_action = reverse_lazy('funds:submissions:list') def get_queryset(self): return super().get_queryset()[:5]