diff --git a/edivorce/apps/core/efilinghub.py b/edivorce/apps/core/efilinghub.py index a535d40a..63447cd5 100644 --- a/edivorce/apps/core/efilinghub.py +++ b/edivorce/apps/core/efilinghub.py @@ -230,16 +230,18 @@ class EFilingHub: if parties: package['filingPackage']['parties'] = parties # update return urls - package['navigationUrls']['error'] = self._get_absolute_url( - request, reverse('dashboard_nav', args=['check_with_registry'])) if self.initial_filing: - package['navigationUrls']['cancel'] = self._get_absolute_url( + package['navigationUrls']['error'] = self._get_absolute_url( request, reverse('dashboard_nav', args=['initial_filing'])) + package['navigationUrls']['cancel'] = self._get_absolute_url( + request, reverse('dashboard_nav', args=['initial_filing'])) + '?cancelled=1' package['navigationUrls']['success'] = self._get_absolute_url( request, reverse('after_submit_initial_files')) else: - package['navigationUrls']['cancel'] = self._get_absolute_url( + package['navigationUrls']['error'] = self._get_absolute_url( request, reverse('dashboard_nav', args=['final_filing'])) + package['navigationUrls']['cancel'] = self._get_absolute_url( + request, reverse('dashboard_nav', args=['final_filing'])) + '?cancelled=1' package['navigationUrls']['success'] = self._get_absolute_url( request, reverse('after_submit_final_files')) @@ -368,7 +370,7 @@ class EFilingHub: if settings.PROXY_BASE_URL: return settings.PROXY_BASE_URL + path else: - return request.build_absolute_uri(path) + return request.build_absolute_uri(path) # -- EFILING HUB INTERFACE -- def get_files(self, request, responses, uploaded, generated): diff --git a/edivorce/apps/core/templates/dashboard/final_filing.html b/edivorce/apps/core/templates/dashboard/final_filing.html index f897228b..cb99f267 100644 --- a/edivorce/apps/core/templates/dashboard/final_filing.html +++ b/edivorce/apps/core/templates/dashboard/final_filing.html @@ -10,7 +10,7 @@ {% block content %}

Final Filing

- {% if final_filing_submitted %} + {% if final_filing_submitted == 'True' %}

You have already completed this step. @@ -262,7 +262,7 @@ hello {% endif %} {% endif %} - {% if not final_filing_submitted and how_to_file == 'Online' %} + {% if final_filing_submitted != 'True' and how_to_file == 'Online' %}

Filing with Court Services Online

When you click Submit Documents, you will be taken to the Court Services Online e-filing hub. In the next few steps you will be able to do a final review of your filed documentation, @@ -279,7 +279,7 @@ {% block formbuttons %}

   Back - {% if how_to_file == 'Online' and not final_filing_submitted %} + {% if how_to_file == 'Online' and final_filing_submitted != 'True'%}     Submit Documents diff --git a/edivorce/apps/core/templates/dashboard/initial_filing.html b/edivorce/apps/core/templates/dashboard/initial_filing.html index b17a8324..f8a275f9 100644 --- a/edivorce/apps/core/templates/dashboard/initial_filing.html +++ b/edivorce/apps/core/templates/dashboard/initial_filing.html @@ -9,7 +9,7 @@ {% block content %}

Initial Filing

- {% if initial_filing_submitted %} + {% if initial_filing_submitted == 'True' %}

You have already completed this step.

@@ -94,7 +94,7 @@

Filing with Court Services Online

- When you click Next, you will be taken to the Court Services Online e-filing hub. + When you click Submit Documents, you will be taken to the Court Services Online e-filing hub. In the next few steps you will be able to do a final review of the documents you are submitting for filing, pay for your filing and (if completed successfully) receive a Package Number.

@@ -125,7 +125,7 @@ {% block formbuttons %}
   Back - {% if initial_filing_submitted %} + {% if initial_filing_submitted == 'True' %} Next    {% elif how_to_file == 'Online' %} diff --git a/edivorce/apps/core/templates/dashboard/next_steps.html b/edivorce/apps/core/templates/dashboard/next_steps.html index 7e8cdc4c..46253f2d 100644 --- a/edivorce/apps/core/templates/dashboard/next_steps.html +++ b/edivorce/apps/core/templates/dashboard/next_steps.html @@ -9,7 +9,7 @@ {% block content %}

Filing Completed

{% if how_to_file == 'Online' %} - {% if final_filing_submitted %} + {% if final_filing_submitted == 'True' %}

You have successfully completed filing online.

@@ -31,7 +31,7 @@ This e-mail will include a {% include "partials/tooltips/court_file_number.html" %}, please keep this number for your records and use it if filing any additional documents.

- {% if final_filing_submitted %} + {% if final_filing_submitted == 'True' %}

Filing Status

diff --git a/edivorce/apps/core/templates/dashboard/wait_for_number.html b/edivorce/apps/core/templates/dashboard/wait_for_number.html index 24d3b445..ce074b2c 100644 --- a/edivorce/apps/core/templates/dashboard/wait_for_number.html +++ b/edivorce/apps/core/templates/dashboard/wait_for_number.html @@ -7,7 +7,7 @@ {% block container_col %}dashboard-content{% endblock %} {% block content %}

Wait for Court File Number

- {% if initial_filing_submitted %} + {% if initial_filing_submitted == 'True' %}

You’ve successfully completed your initial filing with the Court Registry.

diff --git a/edivorce/apps/core/utils/cso_filing.py b/edivorce/apps/core/utils/cso_filing.py index ff97b6c4..9a5b92ef 100644 --- a/edivorce/apps/core/utils/cso_filing.py +++ b/edivorce/apps/core/utils/cso_filing.py @@ -53,7 +53,7 @@ def after_file_documents(request, initial=False): # Save dummy data for now. Eventually replace with data from CSO prefix = 'initial' if initial else 'final' - _save_response(user, f'{prefix}_filing_submitted', True) + _save_response(user, f'{prefix}_filing_submitted', 'True') if not initial: _save_response(user, f'final_filing_status', 'Submitted') diff --git a/edivorce/apps/core/views/efiling.py b/edivorce/apps/core/views/efiling.py index b1098e1e..29fa8178 100644 --- a/edivorce/apps/core/views/efiling.py +++ b/edivorce/apps/core/views/efiling.py @@ -37,6 +37,8 @@ def _submit_files(request, initial=False): if errors: next_page = original_step + if not isinstance(errors, list): + errors = [errors] for error in errors: messages.add_message(request, messages.ERROR, error) diff --git a/edivorce/apps/core/views/main.py b/edivorce/apps/core/views/main.py index 5970880b..13c1e3f5 100644 --- a/edivorce/apps/core/views/main.py +++ b/edivorce/apps/core/views/main.py @@ -191,6 +191,8 @@ def _add_error_messages(nav_step, request, responses_dict): 'The connection to the BC Government’s eFiling Hub is currently not working. ' 'This is a temporary problem. ' 'Please try again now and if this issue persists try again later.') + elif request.GET.get('message'): + messages.add_message(request, messages.ERROR, request.GET.get('message')) @login_required diff --git a/edivorce/settings/local.py b/edivorce/settings/local.py index ed5140a2..89f51e5f 100644 --- a/edivorce/settings/local.py +++ b/edivorce/settings/local.py @@ -50,4 +50,4 @@ KEYCLOAK_LOGOUT = 'http://localhost:8081/auth/realms/justice/protocol/openid-con OIDC_RP_CLIENT_ID = 'edivorce-app' LOGIN_REDIRECT_URL = '/signin' -EFILING_HUB_ENABLED = True +EFILING_HUB_ENABLED = False