Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added page chooser to settings footer links #188

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nickmoreton
Copy link
Contributor

Hi,

In this pull request I have added the possibility to use the Page chooser to set the link destination for footer links.

Model Field:
Added a new field for the page to link to in the FooterLinks class.

Validation
I also added some extra validation to make sure either link url or a page is selected.
It also validates that if link_url is entered then link_label is required.
If a page is selected then it's optional but you can also use link_label to override the page title.

Templates
The footer tags nhsukfrontendsettings_tags.py has been adjusted to pass though the new field and updated the template file footer_link.html to work with the new field.

Tests
I have ran ./dumpdata.sh and written a test for the new feature.

If there's anything else I should do to make this useful, happy to work on it.

@nickmoreton
Copy link
Contributor Author

I've had a chance to fix the failing checks now.

@nickmoreton nickmoreton mentioned this pull request Feb 23, 2021
@mikemonteith
Copy link
Contributor

Thanks again @nickmoreton. I will review as soon as I get a minute

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.

2 participants