Skip to content
Closed

Stash #266

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/server/plugins/engine/pageControllers/PageController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import Boom from '@hapi/boom'
import { type Lifecycle, type RouteOptions, type Server } from '@hapi/hapi'

import { config } from '~/src/config/index.js'
import { type ComponentCollection } from '~/src/server/plugins/engine/components/ComponentCollection.js'
import {
encodeUrl,
Expand Down Expand Up @@ -131,7 +132,7 @@ export class PageController {

get phaseTag() {
const { def } = this
return def.phaseBanner?.phase
return def.phaseBanner?.phase ?? config.get('phaseTag')
}

getHref(path: string): string {
Expand Down
10 changes: 9 additions & 1 deletion src/server/plugins/engine/views/partials/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@

{{ componentList(components) }}

{% if isStartPage %}
{% set buttonText = "Start now" %}
{% elif submitButtonText %}
{% set buttonText = submitButtonText %}
{% else %}
{% set buttonText = "Continue" %}
{% endif %}

<div class="govuk-button-group">
{{ govukButton({
text: "Start now" if isStartPage else "Continue",
text: buttonText,
isStartButton: isStartPage,
preventDoubleClick: true
}) }}
Expand Down
Loading