diff --git a/app.json b/app.json index 4b076a0..8fd4b71 100755 --- a/app.json +++ b/app.json @@ -12,7 +12,10 @@ "FEEDBACK_EMAIL_ADDRESS": { "required": true }, - "TEMPLATE_ID": { + "FEEDBACK_TEMPLATE_ID": { + "required": true + }, + "LINK_TEMPLATE_ID": { "required": true } }, diff --git a/config/routes.config.js b/config/routes.config.js index b7e8b7b..a86cc95 100644 --- a/config/routes.config.js +++ b/config/routes.config.js @@ -8,6 +8,7 @@ const routes = [ { name: 'agreement-2', path: '/agreement-2' }, { name: 'feedback', path: '/feedback' }, { name: 'feedback-thanks', path: '/feedback-thanks' }, + { name: 'email-link', path: '/email-link' }, ] // note: you can define and export a custom configRoutes function here diff --git a/locales/en.json b/locales/en.json index 5ffb38c..db424b9 100644 --- a/locales/en.json +++ b/locales/en.json @@ -62,8 +62,8 @@ "landing-page.intro": "This service will generate customized forms and privacy statements for you based on the type of design research you're doing. Ask your policy colleagues if you need one.", "landing-page.steps-lead-in": "Once you've made the forms and statements, take them to your department's ATIP office for approval. You also need to tell them:", "landing-page.steps-atip": "", - "landing-page.steps-recruit": "how you're planning to recruit participants", - "landing-page.steps-tools": "which tools you'll be using (e.g. a voice recorder, notepad or camera)", + "landing-page.steps-recruit": "how you're planning to recruit participants", + "landing-page.steps-tools": "which tools you'll be using (e.g. a voice recorder, notepad or camera)", "landing-page.steps-activities": "the activities you'll be asking the partipant to do", "landing-page.leadin": "Choose from a:", "landing-page.option1": "Make a consent form for intercept recruiting", @@ -164,5 +164,9 @@ "form.what_went_wrong.desc": "Don't put any identifiable personal information in the text box.", "feedback-thanks.title": "Thank you", "feedback-thanks.intro": "Thank you for your feedback.", - "feedback_link_text": "Did something go wrong?" -} + "feedback_link_text": "Did something go wrong?", + "email-link.title": "Your link has been emailed", + "email-link.title-missing": "Your link has not been emailed", + "email-link.intro": "We have emailed your link to", + "email-link.missing": "We were unable to email your link - did you provide an email address?" +} \ No newline at end of file diff --git a/routes/agreement-1/agreement-1-en.njk b/routes/agreement-1/agreement-1-en.njk index 8bb6afe..80ca164 100644 --- a/routes/agreement-1/agreement-1-en.njk +++ b/routes/agreement-1/agreement-1-en.njk @@ -9,7 +9,7 @@
- You can also email yourself a link to your answers. + You can also email yourself a link to your answers.
+ {{ __('email-link.intro') }} {{data.researcher_email}}: +
+{% else %} ++ {{ __('email-link.missing') }} +
+{% endif %} + +{{data.link}} + +{% endblock %} diff --git a/routes/feedback-thanks/feedback-thanks.controller.js b/routes/feedback-thanks/feedback-thanks.controller.js index eea7ab0..f2641c9 100644 --- a/routes/feedback-thanks/feedback-thanks.controller.js +++ b/routes/feedback-thanks/feedback-thanks.controller.js @@ -16,7 +16,7 @@ module.exports = app => { try { sendNotification({ email: process.env.FEEDBACK_EMAIL_ADDRESS, - templateId: process.env.TEMPLATE_ID, + templateId: process.env.FEEDBACK_TEMPLATE_ID, options: { personalisation: { feedback: data.what_went_wrong,