Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
lung_cancer_screening/questions/forms/agree_terms_of_use_form.py
Outdated
Show resolved
Hide resolved
lung_cancer_screening/questions/forms/agree_terms_of_use_form.py
Outdated
Show resolved
Hide resolved
lung_cancer_screening/questions/forms/agree_terms_of_use_form.py
Outdated
Show resolved
Hide resolved
0fe217b to
b659ab0
Compare
b659ab0 to
b710979
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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