diff --git a/app/categories/__init__.py b/app/categories/__init__.py index 412b81c9b..6b408af8f 100644 --- a/app/categories/__init__.py +++ b/app/categories/__init__.py @@ -11,6 +11,7 @@ from .benefits import bp as benefits_bp from .results import bp as results_bp from .x_cat import bp as x_cat_bp +from .more_problems import bp as more_problems_bp bp = Blueprint("categories", __name__) bp.register_blueprint(domestic_abuse_bp) @@ -25,6 +26,7 @@ bp.register_blueprint(public_bp) bp.register_blueprint(benefits_bp) bp.register_blueprint(x_cat_bp) +bp.register_blueprint(more_problems_bp) from app.categories import urls # noqa: E402,F401 from app.categories import filters # noqa: E402,F401 diff --git a/app/categories/more_problems/__init__.py b/app/categories/more_problems/__init__.py new file mode 100644 index 000000000..b6c0b6c59 --- /dev/null +++ b/app/categories/more_problems/__init__.py @@ -0,0 +1,9 @@ +from flask import Blueprint + +bp = Blueprint( + "more_problems", + __name__, + template_folder="./templates", +) + +from app.categories.more_problems import urls # noqa: E402,F401 diff --git a/app/categories/more_problems/constants.py b/app/categories/more_problems/constants.py new file mode 100644 index 000000000..9e0e3665e --- /dev/null +++ b/app/categories/more_problems/constants.py @@ -0,0 +1,81 @@ +MORE_PROBLEMS = [ + { + "heading": "Adopting a child from outside the UK", + "description": "Adoption processes in the courts.", + "next_page": "find-a-legal-adviser.search", + "category": "mat", + }, + { + "heading": "Appeal a decision that you cannot work with children or vulnerable adults", + "description": "Including if you’re on a ‘barred list’ or disqualified from teaching.", + "next_page": "find-a-legal-adviser.search", + }, + { + "heading": "Anti-social behaviour and gangs", + "description": "If you’re accused or taken to court for anti-social behaviour, including being in a gang.", + "next_page": "categories.x_cat.landlord-council", + }, + { + "heading": "Clinical negligence in babies", + "description": "Help if a baby has brain or nerve damage caused during pregnancy, childbirth or up to 8 weeks old.", + "next_page": "find-a-legal-adviser.search", + "category": "med", + }, + { + "heading": "Compensation for abuse, assault or neglect", + "description": "Includes child abuse, sexual assault, abuse of a vulnerable adult. Claims can be against a person or an organisation.", + "next_page": "find-a-legal-adviser.search", + "category": "aap", + }, + { + "heading": "Domestic abuse - if you have been accused", + "description": "Legal help if you’ve been accused of domestic abuse or forced marriage. Includes non-molestation orders and other court orders.", + "next_page": "categories.results.in_scope", + }, + { + "heading": "Environmental pollution", + "description": "Issues about air, water or land pollution that is harming you or the environment.", + "next_page": "find-a-legal-adviser.search", + "category": "pub", + }, + { + "heading": "Female genital mutilation (FGM)", + "description": "If you or someone else is at risk of FGM.", + "next_page": "categories.domestic_abuse.are_you_at_risk_of_harm", + }, + { + "heading": "Forced marriage", + "description": "Help with forced marriage and Forced Marriage Protection Orders.", + "next_page": "categories.domestic_abuse.are_you_at_risk_of_harm", + }, + { + "heading": "Inquests for family members", + "description": "Advice to prepare for the inquest of a family member.", + "next_page": "find-a-legal-adviser.search", + }, + { + "heading": "Mental health detention", + "description": "Help if you’re held in hospital (‘sectioned’), mental health tribunals and community treatment orders.", + "next_page": "find-a-legal-adviser.search", + "category": "mhe", + }, + { + "heading": "Proceeds of Crime Act", + "description": "If you’re facing legal action to take your money or other assets.", + "next_page": "find-a-legal-adviser.search", + "category": "crm", + }, + { + "heading": "Terrorism", + "description": "If you’re accused of terrorism or financing terrorist groups.", + "next_page": "find-a-legal-adviser.search", + "category": "immas", + "secondary_category": "pub", + }, + { + "heading": "Trafficking, modern slavery", + "description": "Help if you’re a victim of human trafficking or modern slavery.", + "next_page": "find-a-legal-adviser.search", + "category": "immas", + }, +] diff --git a/app/categories/more_problems/urls.py b/app/categories/more_problems/urls.py new file mode 100644 index 000000000..2c5395bbb --- /dev/null +++ b/app/categories/more_problems/urls.py @@ -0,0 +1,34 @@ +from flask import render_template +from app.categories.more_problems import bp +from app.categories.views import CategoryPage +from app.categories.results.views import CannotFindYourProblemPage, NextStepsPage +from app.categories.more_problems.constants import MORE_PROBLEMS + + +class MoreProblemsPage(CategoryPage): + template = "categories/more-problems.html" + + def dispatch_request(self): + listing = MORE_PROBLEMS + return render_template(self.template, listing=listing) + + +bp.add_url_rule( + "/more-problems", + view_func=MoreProblemsPage.as_view( + "landing", template="categories/more-problems.html" + ), +) +bp.add_url_rule( + "/more-problems/cannot-find-your-problem", + view_func=CannotFindYourProblemPage.as_view( + "cannot_find_your_problem", + next_steps_page="categories.more_problems.next_steps", + ), +) +bp.add_url_rule( + "/more-problems/next-steps", + view_func=NextStepsPage.as_view( + "next_steps", + ), +) diff --git a/app/categories/urls.py b/app/categories/urls.py index ea375578e..e8f98e298 100644 --- a/app/categories/urls.py +++ b/app/categories/urls.py @@ -38,9 +38,3 @@ def dispatch_request(self): "/find-your-problem", view_func=IndexPage.as_view("index", template="categories/index.html"), ) -bp.add_url_rule( - "/more-problems", - view_func=CategoryPage.as_view( - "more_problems", template="categories/more-problems.html" - ), -) diff --git a/app/templates/categories/index.html b/app/templates/categories/index.html index 14627b44b..200ff16ca 100644 --- a/app/templates/categories/index.html +++ b/app/templates/categories/index.html @@ -22,7 +22,7 @@