Skip to content
Draft
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: 3 additions & 0 deletions app/locals.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ module.exports = (req, res, next) => {
res.locals.serviceEmail = 'england.digitallungcancerscreening@nhs.net'
res.locals.serviceTelephone = '020 3835 1600'

res.locals.referrer = req.query.referrer
res.locals.query = req.query

next()
}
4 changes: 2 additions & 2 deletions app/prototype_v4/content/contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ title: Contact us

Call us on: {{ serviceTelephone | telephoneLink }}

**Phone lines are open:**
Monday to Friday 8am to 8pm
**Phone lines are open:**<br aria-hidden="true">
Monday to Friday 8am to 8pm<br aria-hidden="true">
Saturdays 8am to 1pm

## If you have questions about the online service
Expand Down
93 changes: 93 additions & 0 deletions app/prototype_v4/controllers/authentication.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
const version = 'v4'
const view = (template) => {
return `prototype_${version}/views/${template}`
}

exports.signIn_get = (req, res) => {

res.render(view('authentication/sign-in'), {
actions: {
back: '/prototype_v4',
next: '/prototype_v4/sign-in'
}
})
}

exports.signIn_post = (req, res) => {
const errors = []

if (errors.length) {
res.render(view('authentication/sign-in'), {
errors,
actions: {
back: '/prototype_v4',
next: '/prototype_v4/sign-in'
}
})
} else {
res.redirect('/prototype_v4/security-code')
}
}

exports.securityCode_get = (req, res) => {

res.render(view('authentication/security-code'), {
actions: {
back: '/prototype_v4/sign-in',
next: '/prototype_v4/security-code'
}
})
}

exports.securityCode_post = (req, res) => {
const errors = []

if (errors.length) {
res.render(view('authentication/security-code'), {
errors,
actions: {
back: '/prototype_v4/sign-in',
next: '/prototype_v4/security-code'
}
})
} else {
res.redirect('/prototype_v4/sign-in-agreement')
}
}

exports.signInAgreement_get = (req, res) => {

res.render(view('authentication/sign-in-agreement'), {
actions: {
back: '/prototype_v4/security-code',
accept: '/prototype_v4/sign-in-agreement',
decline: '/prototype_v4/sign-in-agreement-declined'
}
})
}

exports.signInAgreement_post = (req, res) => {
const errors = []

if (errors.length) {
res.render(view('authentication/sign-in-agreement'), {
errors,
actions: {
back: '/prototype_v4/security-code',
accept: '/prototype_v4/sign-in-agreement',
decline: '/prototype_v4/sign-in-agreement-declined'
}
})
} else {
res.redirect('/prototype_v4/accept-terms')
}
}

exports.signInAgreementDeclined_get = (req, res) => {

res.render(view('authentication/sign-in-agreement-declined'), {
actions: {
back: '/prototype_v4'
}
})
}
Loading