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

Fix add group member #241

Merged
merged 3 commits into from
Mar 28, 2024
Merged
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
12 changes: 6 additions & 6 deletions app/views/product-pages/_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ router.post('/product-pages/org-admin/add-groupadmin-and-editor', function (req,
text: 'Enter an email address in the correct format, like name@example.gov.uk',
href: "#group-name"
}
} else if (!emailToAdd.includes('@cabinet-office.gov.uk')) {
// if the email isn’t a cabinet-office.gov.uk email
} else if (!emailToAdd.includes('@digital.cabinet-office.gov.uk')) {
// if the email isn’t a digital.cabinet-office.gov.uk email
errors['emailToAdd'] = {
text: 'Enter an email address from your organisation',
href: "#group-name"
}
} else if (!emailToAdd.includes('oliver@cabinet-office.gov.uk')) {
// if the email doesn’t have a Forms account, this example specifically looks for “oliver@cabinet-office.gov.uk”
} else if (!emailToAdd.includes('oliver@digital.cabinet-office.gov.uk')) {
// if the email doesn’t have a Forms account, this example specifically looks for “oliver@digital.cabinet-office.gov.uk”
errors['emailToAdd'] = {
text: 'This person does not have a GOV.UK Forms account',
href: "#group-name"
Expand All @@ -69,7 +69,7 @@ router.post('/product-pages/org-admin/add-groupadmin-and-editor', function (req,
res.render('product-pages/org-admin/add-groupadmin-and-editor', { errors, errorList, containsErrors })
} else {
req.session.data.addPerson = 'Oliver'
res.redirect('editmembers2')
res.redirect('editmembers4')
}
})

Expand Down Expand Up @@ -149,4 +149,4 @@ router.post('/product-pages/group-admin/addauser', function (req, res) {
}
})

module.exports = router
module.exports = router
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ <h2 class="govuk-fieldset__heading">
</div>
</fieldset>

<button formaction="editmembers4" type="submit" class="govuk-button" data-module="govuk-button">
<button type="submit" class="govuk-button" data-module="govuk-button">
Add this person
</button>

</form>
</div>
</div>
{% endblock content %}
{% endblock content %}
Loading