diff --git a/edivorce/apps/core/efilinghub.py b/edivorce/apps/core/efilinghub.py index 57e5dce3..63447cd5 100644 --- a/edivorce/apps/core/efilinghub.py +++ b/edivorce/apps/core/efilinghub.py @@ -231,19 +231,19 @@ class EFilingHub: package['filingPackage']['parties'] = parties # update return urls if self.initial_filing: - package['navigationUrls']['error'] = request.build_absolute_uri( - reverse('dashboard_nav', args=['initial_filing'])) - package['navigationUrls']['cancel'] = request.build_absolute_uri( - reverse('dashboard_nav', args=['initial_filing'])) + '?cancelled=1' - package['navigationUrls']['success'] = request.build_absolute_uri( - reverse('after_submit_initial_files')) + 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']['error'] = request.build_absolute_uri( - reverse('dashboard_nav', args=['final_filing'])) - package['navigationUrls']['cancel'] = request.build_absolute_uri( - reverse('dashboard_nav', args=['final_filing'])) + '?cancelled=1' - package['navigationUrls']['success'] = request.build_absolute_uri( - reverse('after_submit_final_files')) + 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')) return package @@ -366,6 +366,12 @@ class EFilingHub: return d + def _get_absolute_url(self, request, path): + if settings.PROXY_BASE_URL: + return settings.PROXY_BASE_URL + path + else: + return request.build_absolute_uri(path) + # -- EFILING HUB INTERFACE -- def get_files(self, request, responses, uploaded, generated): diff --git a/edivorce/apps/core/management/commands/link_check.py b/edivorce/apps/core/management/commands/link_check.py index 86e718ee..8cc4cf5c 100644 --- a/edivorce/apps/core/management/commands/link_check.py +++ b/edivorce/apps/core/management/commands/link_check.py @@ -29,6 +29,9 @@ class Command(BaseCommand): file_path = os.path.join(root, file) fs = open(file_path) + + print('Parsing: ' + fs.name) + soup = BeautifulSoup(fs, 'html.parser') links = soup.find_all('a', href=True) for link in links: diff --git a/edivorce/apps/core/templates/legal.html b/edivorce/apps/core/templates/legal.html index 4abe97dd..fe03c4d1 100644 --- a/edivorce/apps/core/templates/legal.html +++ b/edivorce/apps/core/templates/legal.html @@ -23,7 +23,7 @@

Online resources

- You may want to look at the Divorce self-help kit + You may want to look at the Divorce self-help guide on the Family Law in British Columbia website for a step-by-step guide. You can also visit ClickLaw and the Justice Education Society for online legal information. diff --git a/edivorce/apps/core/templates/pdf/partials/fact_sheet_d.html b/edivorce/apps/core/templates/pdf/partials/fact_sheet_d.html index 6a78f3ce..e67baec2 100644 --- a/edivorce/apps/core/templates/pdf/partials/fact_sheet_d.html +++ b/edivorce/apps/core/templates/pdf/partials/fact_sheet_d.html @@ -12,7 +12,7 @@ {{ responses.number_children_over_19_need_support }}

  • - Child support is to be paid by {{ derived.child_support_payor }} (the “payor”) + Child support is to be paid by {{ derived.child_support_payor }} (the “payor”)
  • Monthly Guidelines table amount of the payor under Schedule 1 of the Guidelines: diff --git a/edivorce/apps/core/templates/prequalification/step_02.html b/edivorce/apps/core/templates/prequalification/step_02.html index 4d6bb046..37de2f95 100644 --- a/edivorce/apps/core/templates/prequalification/step_02.html +++ b/edivorce/apps/core/templates/prequalification/step_02.html @@ -147,9 +147,9 @@ {% block sidebarText %}

    Ordinarily Resident

    - The legal definition of “ordinarily resident” is: the place where in the + The legal definition of “ordinarily resident” is: the place where in the settled routine of an individual's life, he or she regularly, normally or - customarily lives. “Ordinarily” is the word is used in s. 3(1) of the + customarily lives. “Ordinarily” is the word is used in s. 3(1) of the Divorce Act…. A court in a province has jurisdiction to hear and determine a divorce proceeding if either spouse has been ordinarily resident in the province for at least one year immediately preceding the diff --git a/edivorce/apps/core/templates/prequalification/step_03.html b/edivorce/apps/core/templates/prequalification/step_03.html index 81503496..85c40396 100644 --- a/edivorce/apps/core/templates/prequalification/step_03.html +++ b/edivorce/apps/core/templates/prequalification/step_03.html @@ -193,9 +193,9 @@ of 90 days or less. If they live together for more than 90 days, the one-year period of separation starts all over again from the date of the last separation. For more information on separation, - refer to “Separation and Separation Agreements” from the + target="_blank">Separation and Separation Agreements” from the Canadian Bar Association.

    diff --git a/edivorce/apps/core/templates/prequalification/step_04.html b/edivorce/apps/core/templates/prequalification/step_04.html index 0eb22c3f..27ebb1bb 100644 --- a/edivorce/apps/core/templates/prequalification/step_04.html +++ b/edivorce/apps/core/templates/prequalification/step_04.html @@ -287,7 +287,7 @@

    Louis and Jocelyn are divorcing. They have established that the Federal Guidelines apply to their situation. They now need to determine which of their children are - “children of the marriage” —that is, which ones are dependent and need their financial support. + “children of the marriage” —that is, which ones are dependent and need their financial support.

    Tom and Sam are both under the age of majority and are still dependent. Louis and Jocelyn diff --git a/edivorce/apps/core/templates/prequalification/step_05.html b/edivorce/apps/core/templates/prequalification/step_05.html index 1178ca27..568d94ed 100644 --- a/edivorce/apps/core/templates/prequalification/step_05.html +++ b/edivorce/apps/core/templates/prequalification/step_05.html @@ -31,7 +31,7 @@ title="Original Marriage Certificate

    The marriage certificate you received at the church — or any other place where you were married — isn't acceptable in court. You can get a marriage certificate or a certified copy of the registration of marriage from - Vital Statistics + Vital Statistics (an office run by the provincial government)." >marriage certificate or

    -

    If you were married in B.C.
    If you were married in B.C. you can get your marriage certificate or a certified copy of the registration of marriage from Vital Statistics (an office run by the provincial government).

    +

    If you were married in B.C.
    If you were married in B.C. you can get your marriage certificate or a certified copy of the registration of marriage from Vital Statistics (an office run by the provincial government).

    If You Were Married in Another Province
    If you were married in another province you need to get the official marriage certificate or registration of marriage from the office equivalent to the Department of Vital Statistics in that province.

    diff --git a/edivorce/apps/core/templates/question/05_separation.html b/edivorce/apps/core/templates/question/05_separation.html index bb9739fe..05d8720c 100644 --- a/edivorce/apps/core/templates/question/05_separation.html +++ b/edivorce/apps/core/templates/question/05_separation.html @@ -33,11 +33,11 @@

    We are legally required to ask whether or not you and {% spouse_name %} - have agreed to deceive the court. This is called “collusion - ”. An example of collusion is when a couple agrees to lie about the date of separation to speed up the divorce process. + ”. An example of collusion is when a couple agrees to lie about the date of separation to speed up the divorce process. {% if no_collusion_error %}{% include 'partials/required.html' with inline=True %}{% endif %}

    {% if no_collusion_error %} diff --git a/edivorce/apps/core/templates/question/06_children_income_expenses.html b/edivorce/apps/core/templates/question/06_children_income_expenses.html index bdd80b4e..67b26ede 100644 --- a/edivorce/apps/core/templates/question/06_children_income_expenses.html +++ b/edivorce/apps/core/templates/question/06_children_income_expenses.html @@ -219,7 +219,7 @@

    Schedule 1 refers to the federal child support tables which set out the amount of monthly child support payments for each province on the basis of the annual income of the spouse ordered to pay - child support (the “support payer”) and the number of children for whom a table amount is payable. + child support (the “support payer”) and the number of children for whom a table amount is payable.

    diff --git a/edivorce/apps/core/templates/question/06_children_what_for.html b/edivorce/apps/core/templates/question/06_children_what_for.html index f0faaee9..efd3abd4 100644 --- a/edivorce/apps/core/templates/question/06_children_what_for.html +++ b/edivorce/apps/core/templates/question/06_children_what_for.html @@ -476,9 +476,9 @@ {% block formNext %}{% next_step step='children' sub_step='what_for' %}{% endblock %} {% block sidebarText %} -

    What does the law mean by “best interests of the child”?

    +

    What does the law mean by “best interests of the child”?

    - The “best interests of the child” is a legal test used to decide what would best + The “best interests of the child” is a legal test used to decide what would best protect your child’s physical, psychological, and emotional safety, security and well-being. To determine what is in the child’s best interests when making parenting arrangements, you must consider factors including: diff --git a/edivorce/apps/core/templates/question/08_property.html b/edivorce/apps/core/templates/question/08_property.html index 38d09daa..7b927a17 100644 --- a/edivorce/apps/core/templates/question/08_property.html +++ b/edivorce/apps/core/templates/question/08_property.html @@ -88,7 +88,7 @@

    A court will divide family property or debt unequally only if it - would be “significantly unfair” to divide it equally. This means + would be “significantly unfair” to divide it equally. This means that a court will not order an unequal division in most cases. The court can look at a number of factors when deciding whether to divide property or debt unequally.

    diff --git a/edivorce/apps/core/utils/cso_filing.py b/edivorce/apps/core/utils/cso_filing.py index d540821a..9a5b92ef 100644 --- a/edivorce/apps/core/utils/cso_filing.py +++ b/edivorce/apps/core/utils/cso_filing.py @@ -28,19 +28,23 @@ def file_documents(request, responses, initial=False): if errors: return errors, None - hub = EFilingHub(initial_filing=initial) + if not settings.EFILING_HUB_ENABLED: + return after_file_documents(request, initial) + hub = EFilingHub(initial_filing=initial) post_files, documents = hub.get_files(request, responses, uploaded, generated) location = hub.get_location(responses) parties = hub.get_parties(responses) redirect_url, msg = hub.upload(request, post_files, documents, parties, location) + if msg != 'success': + errors.append(msg) + return errors, None + if redirect_url: - return errors, redirect_url + return None, redirect_url - if msg: - return [msg], None return None, None diff --git a/edivorce/settings/base.py b/edivorce/settings/base.py index 53ee961e..e82b0508 100644 --- a/edivorce/settings/base.py +++ b/edivorce/settings/base.py @@ -185,6 +185,7 @@ DEBUG_TOOLBAR_CONFIG = { SECURE_BROWSER_XSS_FILTER = True # eFiling Hub settings +EFILING_HUB_ENABLED = True EFILING_HUB_TOKEN_BASE_URL = env('EFILING_HUB_TOKEN_BASE_URL', 'https://efiling.gov.bc.ca') EFILING_HUB_REALM = env('EFILING_HUB_REALM', 'abc') EFILING_HUB_CLIENT_ID = env('EFILING_HUB_CLIENT_ID', 'abc') diff --git a/edivorce/settings/local.py b/edivorce/settings/local.py index 99c38713..89f51e5f 100644 --- a/edivorce/settings/local.py +++ b/edivorce/settings/local.py @@ -49,3 +49,5 @@ OIDC_OP_USER_ENDPOINT = 'http://localhost:8081/auth/realms/justice/protocol/open KEYCLOAK_LOGOUT = 'http://localhost:8081/auth/realms/justice/protocol/openid-connect/logout' OIDC_RP_CLIENT_ID = 'edivorce-app' LOGIN_REDIRECT_URL = '/signin' + +EFILING_HUB_ENABLED = False