-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from cabinetoffice/fix-redirection-bug-from-ch…
…eck-your-requests-page Fix redirection bug from check your requests page
- Loading branch information
Showing
22 changed files
with
538 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { Request } from 'express'; | ||
import * as config from '../config'; | ||
|
||
export const getPreviousPageUrl = (req: Request): string => (config.PREVIOUS_PAGE_QUERY_PARAM in req.query) ? config.CHECK_YOUR_REQUESTS_URL : config.HOME_URL; |
182 changes: 92 additions & 90 deletions
182
src/views/include/check-your-requests/add-collaborator.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,101 @@ | ||
{% set previousPageQueryParam = "?" + PARAMS.previousPage + "=" + ROUTES.CHECK_YOUR_REQUESTS_URL %} | ||
|
||
{% for collaborator in add_collaborator %} | ||
|
||
{% set firstNameHref = "/add-collaborator/" + collaborator.id + "#first_name" %} | ||
{% set lastNameHref = "/add-collaborator/" + collaborator.id + "#last_name" %} | ||
{% set githubHandleHref = "/add-collaborator/" + collaborator.id + "#github_handle" %} | ||
{% set emailAddressHref = "/add-collaborator/" + collaborator.id + "#email_address" %} | ||
{% set repoHref = "/add-collaborator/" + collaborator.id + "#repo_name" %} | ||
{% set firstNameHref = "/add-collaborator/" + collaborator.id + previousPageQueryParam + "#first_name" %} | ||
{% set lastNameHref = "/add-collaborator/" + collaborator.id + previousPageQueryParam + "#last_name" %} | ||
{% set githubHandleHref = "/add-collaborator/" + collaborator.id + previousPageQueryParam + "#github_handle" %} | ||
{% set emailAddressHref = "/add-collaborator/" + collaborator.id + previousPageQueryParam + "#email_address" %} | ||
{% set repoHref = "/add-collaborator/" + collaborator.id + previousPageQueryParam + "#repo_name" %} | ||
|
||
<br> | ||
{{ govukSummaryList({ | ||
rows: [ | ||
{ | ||
key: { | ||
text: "First Name" | ||
}, | ||
value: { | ||
text: collaborator.first_name | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: firstNameHref, | ||
text: "Change", | ||
visuallyHiddenText: "First Name" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Last Name" | ||
}, | ||
value: { | ||
text: collaborator.last_name | ||
<br> | ||
{{ govukSummaryList({ | ||
rows: [ | ||
{ | ||
key: { | ||
text: "First Name" | ||
}, | ||
value: { | ||
text: collaborator.first_name | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: firstNameHref, | ||
text: "Change", | ||
visuallyHiddenText: "First Name" | ||
} | ||
] | ||
} | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: lastNameHref, | ||
text: "Change", | ||
visuallyHiddenText: "Last Name" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "GitHub Handle" | ||
{ | ||
key: { | ||
text: "Last Name" | ||
}, | ||
value: { | ||
text: collaborator.last_name | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: lastNameHref, | ||
text: "Change", | ||
visuallyHiddenText: "Last Name" | ||
} | ||
] | ||
} | ||
}, | ||
value: { | ||
text: collaborator.github_handle | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: githubHandleHref, | ||
text: "Change", | ||
visuallyHiddenText: "Github Handle" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Email Address" | ||
}, | ||
value: { | ||
text: collaborator.email_address | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: emailAddressHref, | ||
text: "Change", | ||
visuallyHiddenText: "Email Address" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
key: { | ||
text: "Repository Name" | ||
{ | ||
key: { | ||
text: "GitHub Handle" | ||
}, | ||
value: { | ||
text: collaborator.github_handle | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: githubHandleHref, | ||
text: "Change", | ||
visuallyHiddenText: "Github Handle" | ||
} | ||
] | ||
} | ||
}, | ||
value: { | ||
text: collaborator.repo_name | ||
{ | ||
key: { | ||
text: "Email Address" | ||
}, | ||
value: { | ||
text: collaborator.email_address | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: emailAddressHref, | ||
text: "Change", | ||
visuallyHiddenText: "Email Address" | ||
} | ||
] | ||
} | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: repoHref, | ||
text: "Change", | ||
visuallyHiddenText: "Repository name" | ||
} | ||
] | ||
{ | ||
key: { | ||
text: "Repository Name" | ||
}, | ||
value: { | ||
text: collaborator.repo_name | ||
}, | ||
actions: { | ||
items: [ | ||
{ | ||
href: repoHref, | ||
text: "Change", | ||
visuallyHiddenText: "Repository name" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
}) }} | ||
] | ||
}) }} | ||
{% endfor %} |
Oops, something went wrong.