Skip to content

PPHA-669-terms-of-use-pages#357

Merged
jamiefalcus merged 4 commits intomainfrom
PPHA-669-terms-of-use-pages
Mar 16, 2026
Merged

PPHA-669-terms-of-use-pages#357
jamiefalcus merged 4 commits intomainfrom
PPHA-669-terms-of-use-pages

Conversation

@jamiefalcus
Copy link
Contributor

What is the change?

Adding terms of use page and accept terms of use page

Why are we making this change?

So that a user can view and agree to terms of use

Copilot AI review requested due to automatic review settings March 12, 2026 11:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Terms of Use flow to the questionnaire so users can view Terms of Use and explicitly agree before continuing into the questions.

Changes:

  • Introduces /terms-of-use (static TemplateView) and /agree-terms-of-use (new question view + model/form) and routes users through it from Start.
  • Adds persistence for acceptance via TermsOfUseResponse (model + migration) and supporting factories/tests.
  • Extends NHSUK form rendering to support a checkbox-style template and updates global layout/footer to link to Terms of use.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
scripts/tests/unit.sh Adjusts unit test script to skip coverage report when running tagged tests.
lung_cancer_screening/questions/views/have_you_ever_smoked.py Updates back link to return to the new agree-terms step.
lung_cancer_screening/questions/views/agree_terms_of_use.py Adds the Agree Terms of Use view and a (currently unused) gating mixin.
lung_cancer_screening/questions/urls.py Registers agree-terms-of-use and terms-of-use routes.
lung_cancer_screening/questions/tests/unit/views/test_terms_of_use.py Adds view-level tests for agree-terms GET/POST behavior.
lung_cancer_screening/questions/tests/unit/models/test_agree_terms_of_use_response.py Adds model tests for TermsOfUseResponse.
lung_cancer_screening/questions/tests/unit/forms/test_agree_terms_of_use_form.py Adds form tests for the new terms form.
lung_cancer_screening/questions/tests/factories/terms_of_use_response_factory.py Adds factory for TermsOfUseResponse.
lung_cancer_screening/questions/models/terms_of_use_response.py Introduces TermsOfUseResponse model (1:1 with ResponseSet).
lung_cancer_screening/questions/models/init.py Exposes TermsOfUseResponse via package init import.
lung_cancer_screening/questions/migrations/0007_termsofuseresponse.py Creates DB table for terms-of-use acceptance response.
lung_cancer_screening/questions/jinja2/terms_of_use.jinja Adds the Terms of Use content page template.
lung_cancer_screening/questions/jinja2/start.jinja Routes “Continue” from Start to agree-terms step.
lung_cancer_screening/questions/jinja2/agree_terms_of_use.jinja Adds the agree-terms page prelude content and link to terms.
lung_cancer_screening/questions/forms/agree_terms_of_use_form.py Adds the model form used to capture acceptance.
lung_cancer_screening/nhsuk_forms/jinja2/checkbox.jinja Adds a new checkbox rendering template.
lung_cancer_screening/nhsuk_forms/choice_field.py Selects checkbox.jinja template for CheckboxInput.
lung_cancer_screening/jinja2_env.py Modifies Jinja environment/filter configuration (includes new debug filter code).
lung_cancer_screening/core/jinja2/layout.jinja Adds inline CSS for numbered terms page and footer link to Terms of use.
features/questionnaire.feature Updates end-to-end flow to include agreeing to terms before questions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jamiefalcus jamiefalcus force-pushed the PPHA-669-terms-of-use-pages branch 6 times, most recently from 0fe217b to b659ab0 Compare March 16, 2026 12:40
Copy link
Contributor

@Themitchell Themitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jamiefalcus jamiefalcus force-pushed the PPHA-669-terms-of-use-pages branch from b659ab0 to b710979 Compare March 16, 2026 13:55
@sonarqubecloud
Copy link

@jamiefalcus jamiefalcus merged commit e949aad into main Mar 16, 2026
25 checks passed
@jamiefalcus jamiefalcus deleted the PPHA-669-terms-of-use-pages branch March 16, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants