Skip to content

Use custom layout for DXT form pages#66

Merged
aliuk2012 merged 7 commits into
mainfrom
feature/custom-layouts
May 8, 2025
Merged

Use custom layout for DXT form pages#66
aliuk2012 merged 7 commits into
mainfrom
feature/custom-layouts

Conversation

@alexluckett
Copy link
Copy Markdown
Contributor

@alexluckett alexluckett commented May 2, 2025

Creates a new layouts/form.njk, based off our base layouts/page.njk template. This form.njk template adds any required alterations for a form to be presented.

This PR is not quite ready to be merged, I'm having one issue with the initialisation of a YesNo component on a form - just trying to work that out. It's completely unrelated to this change, not quite sure what's going on!

There's a dependency on the next version of the plugin, which hasn't been published yet. See: DEFRA/forms-engine-plugin#60

Old:
image

New:
image

@alexluckett
Copy link
Copy Markdown
Contributor Author

@aliuk2012 @swdpcomputing @dcapilla FYI

@alexluckett alexluckett force-pushed the feature/custom-layouts branch 3 times, most recently from f843586 to 210b8b6 Compare May 7, 2025 12:21
@alexluckett alexluckett marked this pull request as ready for review May 7, 2025 13:32
Comment thread src/server/common/forms/definitions/adding-value.json
Comment thread src/server/common/templates/layouts/form.njk Outdated
Comment thread src/server/common/templates/layouts/form.njk
@aliuk2012 aliuk2012 self-assigned this May 7, 2025
@aliuk2012 aliuk2012 force-pushed the feature/custom-layouts branch from 029e431 to 6783fcc Compare May 7, 2025 15:51
Comment thread src/server/index.js Outdated
@aliuk2012 aliuk2012 force-pushed the feature/custom-layouts branch from 6783fcc to 2decd03 Compare May 7, 2025 17:36
@alexluckett alexluckett force-pushed the feature/custom-layouts branch from 2d19273 to 7e664c6 Compare May 8, 2025 10:14
@aliuk2012 aliuk2012 force-pushed the feature/custom-layouts branch from 7e664c6 to a016120 Compare May 8, 2025 11:59
@aliuk2012 aliuk2012 force-pushed the feature/custom-layouts branch from a016120 to 8a4e007 Compare May 8, 2025 14:48
@aliuk2012 aliuk2012 force-pushed the feature/custom-layouts branch from 8a4e007 to 1e3b033 Compare May 8, 2025 14:56
@aliuk2012 aliuk2012 closed this May 8, 2025
@aliuk2012 aliuk2012 reopened this May 8, 2025
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2025

@aliuk2012 aliuk2012 merged commit 3edfdcc into main May 8, 2025
4 checks passed
@aliuk2012 aliuk2012 deleted the feature/custom-layouts branch May 8, 2025 18:06
tejpowar pushed a commit that referenced this pull request Jul 8, 2025
- Use layouts/form.njk as the base for DXT form pages

- Update DXT to 0.1.14

- Fix blank string

- Import DXT SCSS

- Rename form.njk to dxt-forms.njk

- Add Error: prefix to page title if errors exist

- Include form views on viewpaths


Co-authored-by: Alistair Laing <aliuk2012@users.noreply.github.com>
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