From c2f6bf670bf9e76e20a95fa96c39589413a53c0a Mon Sep 17 00:00:00 2001 From: Shane Edwards Date: Wed, 14 Nov 2018 15:33:03 +0000 Subject: [PATCH 1/8] Your household v9 - Created files for Welsh translation --- .../your-household-v9-cy/assets/household.js | 138 +++ .../assets/numbers-to-words.js | 154 +++ .../assets/personal-details.js | 185 +++ .../assets/prototype-tools.js | 140 +++ .../assets/relationships.js | 619 ++++++++++ .../your-household-v9-cy/assets/utils.js | 39 + _prototypes/your-household-v9-cy/bundle.js | 410 +++++++ .../your-household-v9-cy/confirm-address.html | 95 ++ .../do-you-live-here.html | 120 ++ .../does-anyone-else-live-here.html | 143 +++ _prototypes/your-household-v9-cy/hub.html | 249 ++++ .../i-dont-live-here.html | 116 ++ _prototypes/your-household-v9-cy/index.html | 122 ++ .../individual-decision-other-pin.html | 126 ++ .../individual-decision-other-secure.html | 140 +++ .../individual-decision-pin.html | 112 ++ .../individual-decision-secure.html | 148 +++ .../individual-decision.html | 122 ++ .../individual-details-country.html | 191 +++ .../individual-details-dob.html | 167 +++ .../individual-details-orientation.html | 186 +++ .../individual-details-relationship.html | 243 ++++ .../individual-details-salary.html | 134 +++ .../individual-details-summary.html | 246 ++++ .../individual-intro.html | 83 ++ .../individual-pin-security.html | 121 ++ .../relationships-intro.html | 69 ++ .../relationships-person-select.html | 283 +++++ .../relationships-summary-proxy.html | 18 + .../relationships-summary.html | 1054 +++++++++++++++++ .../your-household-v9-cy/relationships.html | 576 +++++++++ .../your-household-v9-cy/section-intro.html | 71 ++ _prototypes/your-household-v9-cy/style.css | 36 + _prototypes/your-household-v9-cy/summary.html | 318 +++++ .../temp-away-from-home.html | 101 ++ .../temp-living-here-feedback.html | 97 ++ .../temp-living-here.html | 111 ++ .../temp-types-feedback.html | 135 +++ .../temp-types-living-away.html | 158 +++ .../temp-types-question.html | 162 +++ .../your-household-v9-cy/test-address.html | 227 ++++ .../your-household-v9-cy/test-data.html | 42 + .../your-household-v9-cy/visitors.html | 147 +++ .../what-is-your-name.html | 134 +++ .../your-household-v9-cy/who-else-to-add.html | 237 ++++ 45 files changed, 8525 insertions(+) create mode 100644 _prototypes/your-household-v9-cy/assets/household.js create mode 100644 _prototypes/your-household-v9-cy/assets/numbers-to-words.js create mode 100644 _prototypes/your-household-v9-cy/assets/personal-details.js create mode 100644 _prototypes/your-household-v9-cy/assets/prototype-tools.js create mode 100644 _prototypes/your-household-v9-cy/assets/relationships.js create mode 100644 _prototypes/your-household-v9-cy/assets/utils.js create mode 100644 _prototypes/your-household-v9-cy/bundle.js create mode 100644 _prototypes/your-household-v9-cy/confirm-address.html create mode 100644 _prototypes/your-household-v9-cy/do-you-live-here.html create mode 100644 _prototypes/your-household-v9-cy/does-anyone-else-live-here.html create mode 100644 _prototypes/your-household-v9-cy/hub.html create mode 100644 _prototypes/your-household-v9-cy/i-dont-live-here.html create mode 100644 _prototypes/your-household-v9-cy/index.html create mode 100644 _prototypes/your-household-v9-cy/individual-decision-other-pin.html create mode 100644 _prototypes/your-household-v9-cy/individual-decision-other-secure.html create mode 100644 _prototypes/your-household-v9-cy/individual-decision-pin.html create mode 100644 _prototypes/your-household-v9-cy/individual-decision-secure.html create mode 100644 _prototypes/your-household-v9-cy/individual-decision.html create mode 100644 _prototypes/your-household-v9-cy/individual-details-country.html create mode 100644 _prototypes/your-household-v9-cy/individual-details-dob.html create mode 100644 _prototypes/your-household-v9-cy/individual-details-orientation.html create mode 100644 _prototypes/your-household-v9-cy/individual-details-relationship.html create mode 100644 _prototypes/your-household-v9-cy/individual-details-salary.html create mode 100644 _prototypes/your-household-v9-cy/individual-details-summary.html create mode 100644 _prototypes/your-household-v9-cy/individual-intro.html create mode 100644 _prototypes/your-household-v9-cy/individual-pin-security.html create mode 100644 _prototypes/your-household-v9-cy/relationships-intro.html create mode 100644 _prototypes/your-household-v9-cy/relationships-person-select.html create mode 100644 _prototypes/your-household-v9-cy/relationships-summary-proxy.html create mode 100644 _prototypes/your-household-v9-cy/relationships-summary.html create mode 100644 _prototypes/your-household-v9-cy/relationships.html create mode 100644 _prototypes/your-household-v9-cy/section-intro.html create mode 100644 _prototypes/your-household-v9-cy/style.css create mode 100644 _prototypes/your-household-v9-cy/summary.html create mode 100644 _prototypes/your-household-v9-cy/temp-away-from-home.html create mode 100644 _prototypes/your-household-v9-cy/temp-living-here-feedback.html create mode 100644 _prototypes/your-household-v9-cy/temp-living-here.html create mode 100644 _prototypes/your-household-v9-cy/temp-types-feedback.html create mode 100644 _prototypes/your-household-v9-cy/temp-types-living-away.html create mode 100644 _prototypes/your-household-v9-cy/temp-types-question.html create mode 100644 _prototypes/your-household-v9-cy/test-address.html create mode 100644 _prototypes/your-household-v9-cy/test-data.html create mode 100644 _prototypes/your-household-v9-cy/visitors.html create mode 100644 _prototypes/your-household-v9-cy/what-is-your-name.html create mode 100644 _prototypes/your-household-v9-cy/who-else-to-add.html diff --git a/_prototypes/your-household-v9-cy/assets/household.js b/_prototypes/your-household-v9-cy/assets/household.js new file mode 100644 index 0000000000..db907f8449 --- /dev/null +++ b/_prototypes/your-household-v9-cy/assets/household.js @@ -0,0 +1,138 @@ +import {autoIncrementId} from './utils'; + +export const HOUSEHOLD_MEMBERS_STORAGE_KEY = 'household-members'; +export const USER_HOUSEHOLD_MEMBER_ID = 'person_me'; +export const HOUSEHOLD_MEMBER_TYPE = 'household-member'; +export const VISITOR_TYPE = 'visitor'; + +/** + * Types + */ +export function person(opts) { + if (opts.firstName === '' || opts.lastName === '') { + console.log('Unable to create person with data: ', + opts.firstName, + !opts.middleName, + !opts.lastName); + } + + let middleName = opts.middleName || ''; + + return { + fullName: opts.firstName + ' ' + middleName + ' ' + opts.lastName, + firstName: opts.firstName, + middleName, + lastName: opts.lastName + }; +} + +/** + * Storage + */ +export function getUserAsHouseholdMember() { + return getAllHouseholdMembers().find((member) => { + return member['@person'].id === USER_HOUSEHOLD_MEMBER_ID; + }); +} + +export function deleteUserAsHouseholdMember() { + deleteHouseholdMember(USER_HOUSEHOLD_MEMBER_ID); +} + +export function deleteHouseholdMember(personId) { + let members = getAllHouseholdMembers().filter((member) => { + return member['@person'].id !== personId; + }); + + sessionStorage.setItem(HOUSEHOLD_MEMBERS_STORAGE_KEY, + JSON.stringify(members)); +} + +export function updateUserAsHouseholdMember(person, memberData) { + let userAsHouseholdMember = getUserAsHouseholdMember(); + + userAsHouseholdMember + ? updateHouseholdMember(userAsHouseholdMember['@person'], memberData) + : addHouseholdMember(person, memberData, USER_HOUSEHOLD_MEMBER_ID); +} + +export function updateHouseholdMember(person, memberData) { + let membersUpdated = getAllHouseholdMembers().map((member) => { + return member['@person'].id === person.id + ? {...member, ...memberData, '@person': {...member['@person'], ...person}} + : member; + }); + + sessionStorage.setItem(HOUSEHOLD_MEMBERS_STORAGE_KEY, + JSON.stringify(membersUpdated)); +} + +export function addHouseholdMember(person, memberData, id) { + let people = getAllHouseholdMembers() || []; + memberData = memberData || {}; + + /** + * User is always first in the household list + */ + people[id === USER_HOUSEHOLD_MEMBER_ID ? 'unshift' : 'push']({ + ...memberData, + type: memberData.type || HOUSEHOLD_MEMBER_TYPE, + '@person': { + ...person, + id: id || 'person' + autoIncrementId('household-members') + } + }); + + sessionStorage.setItem(HOUSEHOLD_MEMBERS_STORAGE_KEY, JSON.stringify(people)); +} + +export function getAllHouseholdMembers() { + return JSON.parse(sessionStorage.getItem(HOUSEHOLD_MEMBERS_STORAGE_KEY)) || []; +} + +export function getHouseholdMemberByPersonId(id) { + return getAllHouseholdMembers().find(function(member) { + return member['@person'].id === id; + }); +} + +export function getMemberPersonId(member) { + return member['@person'].id; +} + +/** + * Comparators + */ +export function isVisitor(member) { + return member.type === window.ONS.storage.KEYS.VISITOR_TYPE; +} + +export function isHouseholdMember(member) { + return member.type === window.ONS.storage.KEYS.HOUSEHOLD_MEMBER_TYPE; +} + +export function isOtherHouseholdMember(member) { + return member.type === window.ONS.storage.KEYS.HOUSEHOLD_MEMBER_TYPE && + member['@person'].id !== window.ONS.storage.IDS.USER_HOUSEHOLD_MEMBER_ID; +} + +export const tempAwayQuestionSentenceMap = { + 'three-more': 'People who usually live outside the UK who are staying in the UK for 3 months or more', + 'perm-away': 'People who work away from home within the UK, if this is' + + ' their permanent or family home', + 'armed-forces': 'Members of the armed forces, if this is their permanent or' + + ' family home', + 'less-twelve': 'People who are temporarily outside the UK for less than 12' + + ' months', + 'usually-temp': 'People staying temporarily who usually live in the UK but' + + ' do not have another UK address, for example, relatives, friends', + 'other': 'Other people who usually live here, including anyone temporarily' + + ' away from home' +}; + +export const visitorQuestionSentenceMap = { + 'usually-in-uk': 'People who usually live somewhere else in the UK, for example boy/girlfriends, friends or relatives', + 'second-address': 'People staying here because it is their second address, for example, for work. Their permanent or family home is elsewhere', + 'less-three': 'People who usually live outside the UK who are staying in the UK for less than three months', + 'on-holiday': 'People here on holiday', +} diff --git a/_prototypes/your-household-v9-cy/assets/numbers-to-words.js b/_prototypes/your-household-v9-cy/assets/numbers-to-words.js new file mode 100644 index 0000000000..5016db1b60 --- /dev/null +++ b/_prototypes/your-household-v9-cy/assets/numbers-to-words.js @@ -0,0 +1,154 @@ +/** + * Copied from: + * https://codereview.stackexchange.com/questions/90349/changing-number-to-words-in-javascript + * =============== + */ +var ONE_TO_NINETEEN = [ + 'one', 'two', 'three', 'four', 'five', + 'six', 'seven', 'eight', 'nine', 'ten', + 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', + 'sixteen', 'seventeen', 'eighteen', 'nineteen' +]; + +var TENS = [ + 'ten', 'twenty', 'thirty', 'forty', 'fifty', + 'sixty', 'seventy', 'eighty', 'ninety' +]; + +var SCALES = ['thousand', 'million', 'billion', 'trillion']; + +// helper function for use with Array.filter +function isTruthy(item) { + return !!item; +} + +// convert a number into 'chunks' of 0-999 +function chunk(number) { + var thousands = []; + + while(number > 0) { + thousands.push(number % 1000); + number = Math.floor(number / 1000); + } + + return thousands; +} + +// translate a number from 1-999 into English +function inEnglish(number) { + var thousands, hundreds, tens, ones, words = []; + + if(number < 20) { + return ONE_TO_NINETEEN[number - 1]; // may be undefined + } + + if(number < 100) { + ones = number % 10; + tens = number / 10 | 0; // equivalent to Math.floor(number / 10) + + words.push(TENS[tens - 1]); + words.push(inEnglish(ones)); + + return words.filter(isTruthy).join('-'); + } + + hundreds = number / 100 | 0; + words.push(inEnglish(hundreds)); + words.push('hundred'); + words.push(inEnglish(number % 100)); + + return words.filter(isTruthy).join(' '); +} + +// append the word for a scale. Made for use with Array.map +function appendScale(chunk, exp) { + var scale; + if (!chunk) { + return null; + } + scale = SCALES[exp - 1]; + return [chunk, scale].filter(isTruthy).join(' '); +} + +/** + * =============== + * End copy + */ + +/** + * Modification - decorator + */ +var NUMBER_TO_POSITION_TEXT_MAP = { + 'one': 'first', + 'two': 'second', + 'three': 'third', + 'four': 'fourth', + 'five': 'fifth', + 'six': 'sixth', + 'seven': 'seventh', + 'eight': 'eighth', + 'nine': 'ninth', + 'ten': 'tenth', + 'eleven': 'eleventh', + 'twelve': 'twelfth', + 'thirteen': 'thirteenth', + 'fourteen': 'fourteenth', + 'fifteen': 'fifteenth', + 'sixteen': 'sixteenth', + 'seventeen': 'seventeenth', + 'eighteen': 'eighteenth', + 'nineteen': 'nineteenth', + + 'twenty': 'twentieth', + 'thirty': 'thirtieth', + 'forty': 'fortieth', + 'fifty': 'fiftieth', + 'sixty': 'sixtieth', + 'seventy': 'seventieth', + 'eighty': 'eightieth', + 'ninety': 'ninetieth', + 'hundred': 'hundredth', + + 'thousand': 'thousandth', + 'million': 'millionth', + 'billion': 'billionth', + 'trillion': 'trillionth' +}; + +export function numberToPositionWord(num) { + const str = chunk(num) + .map(inEnglish) + .map(appendScale) + .filter(isTruthy) + .reverse() + .join(' '); + + const sub = str.split(' '), + lastWordDashSplitArr = sub[sub.length - 1].split('-'), + lastWord = lastWordDashSplitArr[lastWordDashSplitArr.length - 1], + + newLastWord = (lastWordDashSplitArr.length > 1? lastWordDashSplitArr[0] + '-' : '') + + NUMBER_TO_POSITION_TEXT_MAP[lastWord]; + + /*console.log('str:', str); + console.log('sub:', sub); + console.log('lastWordDashSplitArr:', lastWordDashSplitArr); + console.log('lastWord:', lastWord); + console.log('newLastWord:', newLastWord);*/ + + const subCopy = [].concat(sub); + subCopy.pop(); + const prefix = subCopy.join(' '); + const result = (prefix ? prefix + ' ' : '') + newLastWord; + + // console.log('result', (prefix ? prefix + ' ' : '') + newLastWord); + return result; +} + +export function numberToWordsStyleguide(number) { + if (number > 9) { + return number; + } + + return ONE_TO_NINETEEN[number - 1]; +} \ No newline at end of file diff --git a/_prototypes/your-household-v9-cy/assets/personal-details.js b/_prototypes/your-household-v9-cy/assets/personal-details.js new file mode 100644 index 0000000000..d9c9f4f5a4 --- /dev/null +++ b/_prototypes/your-household-v9-cy/assets/personal-details.js @@ -0,0 +1,185 @@ +export const PERSONAL_DETAILS_KEY = 'individual-details'; +export const PERSONAL_PINS_KEY = 'individual-pins'; + +export const personalDetailsMaritalStatusMap = { + 'never': { + description: 'Never married and never registered a same-sex civil' + + ' partnership' + }, + 'married': { + description: 'Married' + }, + 'registered': { + description: 'In a registered same-sex civil partnership' + }, + 'separated-married': { + description: 'Separated, but still legally married' + }, + 'divorced': { + description: 'Divorced' + }, + 'former-partnership': { + description: 'Formerly in a same-sex civil partnership which is now' + + ' legally dissolved' + }, + 'widowed': { + description: 'Widowed' + }, + 'surviving-partner': { + description: 'Surviving partner from a same-sex civil partnership' + }, + 'separated-partnership': { + description: 'Separated, but still legally in a same-sex civil partnership' + } +}; + +export const personalDetailsCountryMap = { + 'england': { + description: 'England' + }, + 'wales': { + description: 'Wales' + }, + 'scotland': { + description: 'Scotland' + }, + 'northern-ireland': { + description: 'Northern Ireland' + }, + 'republic-ireland': { + description: 'Republic of Ireland' + }, + 'elsewhere': { + description: 'Elsewhere' + } +}; + +export const personalDetailsOrientationMap = { + 'straight': { + description: 'Straight or Heterosexual' + }, + 'gay': { + description: 'Gay or Lesbian' + }, + 'bisexual': { + description: 'Bisexual' + }, + 'other': { + description: 'Other' + }, + 'no-say': { + description: 'Prefer not to say' + } +}; + +export function addUpdatePersonalDetailsDOB(personId, day, month, year) { + let allDetails = getAllPersonalDetails(), + details = allDetails[personId] || {}; + + details['dob'] = { + day, + month, + year + }; + + updatePersonalDetails(personId, details); + + return details; +} + +export function addUpdateMaritalStatus(personId, val) { + let allDetails = getAllPersonalDetails(), + details = allDetails[personId] || {}; + + details['maritalStatus'] = val; + + updatePersonalDetails(personId, details); + + return details; +} + +export function addUpdateCountry(personId, val) { + let allDetails = getAllPersonalDetails(), + details = allDetails[personId] || {}; + + details['country'] = val; + + updatePersonalDetails(personId, details); + + return details; +} + +export function addUpdateOrientation(personId, val) { + let allDetails = getAllPersonalDetails(), + details = allDetails[personId] || {}; + + details['orientation'] = val; + + updatePersonalDetails(personId, details); + + return details; +} + +export function addUpdateSalary(personId, val) { + let allDetails = getAllPersonalDetails(), + details = allDetails[personId] || {}; + + details['salary'] = val; + + updatePersonalDetails(personId, details); + + return details; +} + +export function getPins() { + return JSON.parse(sessionStorage.getItem(PERSONAL_PINS_KEY)) || {}; +} + +export function createPinFor(personId, opts = {}) { + let pins = getPins(); + + pins[personId] = { + pin: _.random(10000, 99999), + exported: !!opts.exported + }; + + sessionStorage.setItem(PERSONAL_PINS_KEY, JSON.stringify(pins)); + + return pins[personId]; +} + +export function getPinFor(personId) { + return getPins()[personId]; +} + +export function unsetPinFor(personId) { + let pins = getPins(); + + delete pins[personId]; + + sessionStorage.setItem(PERSONAL_PINS_KEY, JSON.stringify(pins)); +} + +export function updatePersonalDetails(personId, details) { + sessionStorage.setItem(PERSONAL_DETAILS_KEY, JSON.stringify({ + ...getAllPersonalDetails(), + [personId]: details + })); + + return details; +} + +export function getAllPersonalDetails() { + return JSON.parse(sessionStorage.getItem(PERSONAL_DETAILS_KEY)) || {}; +} + +export function getPersonalDetailsFor(personId) { + const storageObj = JSON.parse(sessionStorage.getItem(PERSONAL_DETAILS_KEY)) || {}, + personObj = storageObj[personId]; + + if (!personObj) { + console.log('Personal details for ' + personId + ' not found'); + } + + return personObj; +} diff --git a/_prototypes/your-household-v9-cy/assets/prototype-tools.js b/_prototypes/your-household-v9-cy/assets/prototype-tools.js new file mode 100644 index 0000000000..f10303505c --- /dev/null +++ b/_prototypes/your-household-v9-cy/assets/prototype-tools.js @@ -0,0 +1,140 @@ +export function tools () { + + const $listLinks = $('.test-data-links'), + + $createFamilyHousehold = $('
  • ' + + 'Create family household
  • '), + + $createFamilyRelationships = $('
  • ' + + 'Create family relationships
  • '), + + familyHouseholdMembersData = [{ + 'type': 'household-member', + '@person': { + 'fullName': 'Dave Jones', + 'firstName': 'Dave', + 'middleName': '', + 'lastName': 'Jones', + 'id': 'person_me' + } + }, { + 'type': + 'household-member', + '@person': { + 'fullName': 'Sally Jones', + 'firstName': 'Sally', + 'middleName': '', + 'lastName': 'Jones', + 'id': 'person1' + } + }, { + 'type': 'household-member', + '@person': { + 'fullName': 'Rebecca Jones', + 'firstName': 'Rebecca', + 'middleName': '', + 'lastName': 'Jones', + 'id': 'person2' + } + }, { + 'type': 'household-member', + '@person': { + 'fullName': 'Amy Jones', + 'firstName': 'Amy', + 'middleName': '', + 'lastName': 'Jones', + 'id': 'person3' + } + }], + + familyHouseholdRelationshipsData = [{ + 'personIsDescription': 'husband-wife', + 'personIsId': 'person1', + 'personToId': 'person_me', + 'inferred': false, + 'id': 1 + }, { + 'personIsDescription': 'son-daughter', + 'personIsId': 'person2', + 'personToId': 'person_me', + 'inferred': false, + 'id': 2 + }, { + 'personIsDescription': 'mother-father', + 'personIsId': 'person_me', + 'personToId': 'person3', + 'inferred': false, + 'id': 3 + }, { + 'personIsDescription': 'son-daughter', + 'personIsId': 'person2', + 'personToId': 'person1', + 'inferred': false, + 'id': 4 + }, { + 'personIsDescription': 'mother-father', + 'personIsId': 'person1', + 'personToId': 'person3', + 'inferred': false, + 'id': 5 + }, { + 'personIsDescription': 'brother-sister', + 'personIsId': 'person3', + 'personToId': 'person2', + 'inferred': true, + 'inferredBy': [3, 5, 2, 4], + 'id': 6 + }], + + userData = { + 'fullName': 'Dave Jones', + 'firstName': 'Dave', + 'middleName': '', + 'lastName': 'Jones' + }; + + $createFamilyHousehold.on('click', function(e) { + e.preventDefault(); + clearStorage(); + createFamilyHousehold(); + }); + + $createFamilyRelationships.on('click', function(e) { + e.preventDefault(); + clearStorage(); + createFamilyHousehold(); + createFamilyRelationships(); + }); + + function prerequisites() { + sessionStorage.setItem('address', '12 Somewhere Close, Newport, CF12 3AB'); + sessionStorage.setItem('address-line-1', '12'); + sessionStorage.setItem('address-line-2', 'Somewhere close'); + sessionStorage.setItem('county', 'Newport'); + sessionStorage.setItem('lives-here', 'yes'); + sessionStorage.setItem('postcode', 'CF12 3AB'); + sessionStorage.setItem('town-city', 'Newport'); + } + + function createFamilyHousehold() { + prerequisites(); + sessionStorage.setItem('user-details', JSON.stringify(userData)); + sessionStorage.setItem(window.ONS.storage.KEYS.HOUSEHOLD_MEMBERS_STORAGE_KEY, JSON.stringify(familyHouseholdMembersData)); + sessionStorage.setItem('household-members-increment', JSON.stringify(4)); + window.location.href = '../summary'; + } + + function createFamilyRelationships() { + sessionStorage.setItem(window.ONS.storage.KEYS.RELATIONSHIPS_STORAGE_KEY, JSON.stringify(familyHouseholdRelationshipsData)); + sessionStorage.setItem('relationships-increment', JSON.stringify(6)); + window.location.href = '../relationships-summary'; + } + + function clearStorage() { + sessionStorage.clear(); + } + + $listLinks.append($createFamilyHousehold); + $listLinks.append($createFamilyRelationships); +} diff --git a/_prototypes/your-household-v9-cy/assets/relationships.js b/_prototypes/your-household-v9-cy/assets/relationships.js new file mode 100644 index 0000000000..37472d7412 --- /dev/null +++ b/_prototypes/your-household-v9-cy/assets/relationships.js @@ -0,0 +1,619 @@ +import {autoIncrementId, removeFromList, trailingNameS} from './utils'; +import { + isHouseholdMember, + getAllHouseholdMembers, + getHouseholdMemberByPersonId, + USER_HOUSEHOLD_MEMBER_ID +} from './household'; + +/** + * Augment Underscore library + */ +const _ = window._ || {}; + +export const RELATIONSHIPS_STORAGE_KEY = 'relationships'; + +export const relationshipTypes = { + 'spouse': {id: 'spouse'}, + 'child-parent': {id: 'child-parent'}, + 'step-child-parent': {id: 'step-child-parent'}, + 'grandchild-grandparent': {id: 'grandchild-grandparent'}, + 'half-sibling': {id: 'half-sibling'}, + 'sibling': {id: 'sibling'}, + 'step-brother-sister': {id: 'step-brother-sister'}, + 'partner': {id: 'partner'}, + 'unrelated': {id: 'unrelated'}, + 'other-relation': {id: 'other-relation'} +}; + +export const relationshipDescriptionMap = { + // covered + 'husband-wife': { + sentanceLabel: 'husband or wife', + summaryAdjective: 'husband or wife', + type: relationshipTypes['spouse'] + }, + // covered + 'mother-father': { + sentanceLabel: 'mother or father', + summaryAdjective: 'mother or father', + type: relationshipTypes['child-parent'] + }, + // covered + 'step-mother-father': { + sentanceLabel: 'stepmother or stepfather', + summaryAdjective: 'stepmother or stepfather', + type: relationshipTypes['step-child-parent'] + }, + // covered + 'son-daughter': { + sentanceLabel: 'son or daughter', + summaryAdjective: 'son or daughter', + type: relationshipTypes['child-parent'] + }, + // covered + 'half-brother-sister': { + sentanceLabel: 'half-brother or half-sister', + summaryAdjective: 'half-brother or half-sister', + type: relationshipTypes['half-sibling'] + }, + // covered + 'step-child': { + sentanceLabel: 'stepchild', + summaryAdjective: 'stepchild', + type: relationshipTypes['step-child-parent'] + }, + // covered + 'grandparent': { + sentanceLabel: 'grandparent', + summaryAdjective: 'grandparent', + type: relationshipTypes['grandchild-grandparent'] + }, + // covered + 'grandchild': { + sentanceLabel: 'grandchild', + summaryAdjective: 'grandchild', + type: relationshipTypes['grandchild-grandparent'] + }, + // covered + 'brother-sister': { + sentanceLabel: 'brother or sister', + summaryAdjective: 'brother or sister', + type: relationshipTypes['sibling'] + }, + // covered + 'step-brother-sister': { + sentanceLabel: 'stepbrother or stepsister', + summaryAdjective: 'stepbrother or stepsister', + type: relationshipTypes['step-brother-sister'] + }, + // covered + 'other-relation': { + sentanceLabel: 'other relation', + summaryAdjective: 'related', + type: relationshipTypes['other-relation'] + }, + // covered + 'partner': { + sentanceLabel: 'partner', + summaryAdjective: 'partner', + type: relationshipTypes['partner'] + }, + 'same-sex-partner': { + sentanceLabel: 'legally registered civil partner', + summaryAdjective: 'legally registered civil partner', + type: relationshipTypes['partner'] + }, + // covered + 'unrelated': { + sentanceLabel: 'unrelated', + summaryAdjective: 'unrelated', + type: relationshipTypes['unrelated'] + } +}; + +function nameElement(name) { + return '' + name + ''; +} + +function personListStr(peopleArr, opts = {}) { + if (peopleArr.length < 1) { + console.log(peopleArr, 'not enough people to create a list string'); + return; + } + + if (peopleArr.length === 1) { + return nameElement(peopleArr[0].fullName + formatPersonIfYou(peopleArr[0])); + } + + let peopleCopy = [...peopleArr], + lastPerson = peopleCopy.pop(); + + return peopleCopy + .map((person) => `${nameElement(person.fullName + + (opts.isFamily ? trailingNameS(person.fullName) : '') + + formatPersonIfYou(person))}`) + .join(', ') + ' and ' + nameElement(lastPerson.fullName + + (opts.isFamily ? trailingNameS(lastPerson.fullName) : '') + + formatPersonIfYou(lastPerson)) +} + +function formatPersonIfYou(person) { + return person.id === USER_HOUSEHOLD_MEMBER_ID ? ' (You)' : ''; +} + +export const relationshipSummaryTemplates = { + 'partnership': (person1, person2, description) => { + return `${nameElement(person1.fullName + formatPersonIfYou(person1))} is ${nameElement(person2.fullName + trailingNameS(person2.fullName) + formatPersonIfYou(person2))} ${description}`; + }, + 'twoFamilyMembersToMany': (parent1, parent2, childrenArr, description) => { + return `${nameElement(parent1.fullName + formatPersonIfYou(parent1))} and ${nameElement(parent2.fullName + formatPersonIfYou(parent2))} are ${personListStr(childrenArr, {isFamily: true})} ${description}`; + }, + 'oneFamilyMemberToMany': (parent, childrenArr, description) => { + console.log(parent, childrenArr, description); + return `${nameElement(parent.fullName + formatPersonIfYou(parent))} is ${personListStr(childrenArr, {isFamily: true})} ${description}`; + }, + 'manyToMany': (peopleArr1, peopleArr2, description) => { + return `${personListStr(peopleArr1)} ${peopleArr1.length > 1 ? 'are' : 'is'} ${description} to ${personListStr(peopleArr2)}`; + }, + 'allMutual': (peopleArr, description) => { + return `${personListStr(peopleArr)} are ${description}`; + } +}; + +/** + * Types + */ +export function relationship(description, personIsId, personToId, opts = {}) { + return { + personIsDescription: description, + personIsId: personIsId, + personToId: personToId, + inferred: !!opts.inferred, + inferredBy: opts.inferredBy + }; +} + +/** + * Storage + */ +export function addRelationship(relationshipObj) { + let householdRelationships = getAllRelationships() || [], + item = { + ...relationshipObj, + id: autoIncrementId(RELATIONSHIPS_STORAGE_KEY) + }; + + householdRelationships.push(item); + + sessionStorage.setItem(RELATIONSHIPS_STORAGE_KEY, + JSON.stringify(householdRelationships)); + + return item; +} + +export function deleteRelationship(relationshipObj) { + let householdRelationships = (getAllRelationships() || []) + .filter(relationship => relationship.id !== relationshipObj.id); + + sessionStorage.setItem(RELATIONSHIPS_STORAGE_KEY, + JSON.stringify(householdRelationships)); +} + +export function editRelationship(relationshipId, valueObject) { + let householdRelationships = (getAllRelationships() || []).map(function(relationship) { + return (relationship.id + '') === (relationshipId + '') ? { + ...valueObject, + id: relationshipId + } : relationship; + }); + + sessionStorage.setItem(RELATIONSHIPS_STORAGE_KEY, + JSON.stringify(householdRelationships)); +} + +export function getAllRelationships() { + return JSON.parse(sessionStorage.getItem(RELATIONSHIPS_STORAGE_KEY)) || []; +} + +export function getAllManualRelationships() { + return getAllRelationships().filter((relationship) => { + return !relationship.inferred; + }); +} + +export function deleteAllRelationshipsForMember(personId) { + const householdRelationships = getAllRelationships() + .filter((relationship) => { + return !(personId === relationship.personIsId || personId === relationship.personToId); + }); + + sessionStorage.setItem(RELATIONSHIPS_STORAGE_KEY, + JSON.stringify(householdRelationships)); +} + +/** + * Comparators + */ +export function isInRelationship(personId, relationship) { + return relationship.personToId === personId || relationship.personIsId === personId; +} + +export function isAChildInRelationship(personId, relationship) { + /** + * Guard + */ + if (!isInRelationship(personId, relationship)) { + return false; + } + + return ( + relationship.personIsDescription === 'mother-father' && + relationship.personToId === personId + ) || ( + relationship.personIsDescription === 'son-daughter' && + relationship.personIsId === personId + ); +} + +export function isASiblingInRelationship(personId, relationship) { + return isInRelationship(personId, relationship) && + relationshipDescriptionMap[relationship.personIsDescription].type.id === 'sibling'; +} + +export function isAParentInRelationship(personId, relationship) { + /** + * Guard + */ + if (!isInRelationship(personId, relationship)) { + return false; + } + + return ( + relationship.personIsDescription === 'mother-father' && + relationship.personIsId === personId + ) || ( + relationship.personIsDescription === 'son-daughter' && + relationship.personToId === personId + ); +} + +export function areAnyChildrenInRelationshipNotParent(childrenIds, notParentId, relationship) { + /** + * Guard + * If relationship type is not child-parent + */ + if (relationshipDescriptionMap[relationship.personIsDescription] + .type.id !== 'child-parent') { + + return false; + } + + let childIndexAsPersonIs = childrenIds.indexOf(relationship.personIsId), + childIndexAsPersonTo = childrenIds.indexOf(relationship.personToId); + + /** + * Find parents with the same children + * + * If a personIs-child is not in relationship + * or 2 children are found in relationship + */ + if ( + (childIndexAsPersonIs === -1 && childIndexAsPersonTo === -1) || + (childIndexAsPersonIs !== -1 && childIndexAsPersonTo !== -1) + ) { + return false; + } + + /** + * Child must be in relationship, get child index + */ + let childIndex = childIndexAsPersonIs !== -1 + ? childIndexAsPersonIs + : childIndexAsPersonTo; + + /** + * If personIs is not in relationship + * and child from previous relationship is a child in this relationship + */ + return !isInRelationship(notParentId, relationship) && + isAChildInRelationship(childrenIds[childIndex], relationship); +} + +export function isRelationshipType(relationshipType, relationship) { + const typeOfRelationship = relationshipDescriptionMap[relationship.personIsDescription] + .type.id; + + /** + * relationshipType can be an array of types + */ + return _.isArray(relationshipType) + ? !!_.find(relationshipType, function(rType) { + return rType === typeOfRelationship; + }) + : typeOfRelationship === relationshipType; +} + +export function isRelationshipInferred(relationship) { + return relationship.inferred; +} + +/** + * Retrieve people by role in relationships + */ +export function getParentIdFromRelationship(relationship) { + let parentId; + + if (relationship.personIsDescription === 'mother-father') { + parentId = relationship.personIsId; + } + + if (relationship.personIsDescription === 'son-daughter') { + parentId = relationship.personToId; + } + + if (!parentId) { + console.log('Parent not found in relationship: ', relationship); + return false; + } + + return parentId; +} + +export function getChildIdFromRelationship(relationship) { + let childId; + + if (relationship.personIsDescription === 'mother-father') { + childId = relationship.personToId; + } + + if (relationship.personIsDescription === 'son-daughter') { + childId = relationship.personIsId; + } + + if (!childId) { + console.log('Child not found in relationship: ', relationship); + return false; + } + + return childId; +} + +export function getSiblingIdFromRelationship(personId, relationship) { + if (!isInRelationship(personId, relationship)) { + console.log('Person ' + personId + ' not found in relationship: ', relationship); + return false; + } + + return relationship[relationship.personIsId === personId ? 'personToId' : 'personIsId']; +} + +export function getOtherPersonIdFromRelationship(personId, relationship) { + return relationship.personIsId === personId + ? relationship.personToId : relationship.personIsId; +} + +export function getAllParentsOf(personId) { + return getAllRelationships() + .filter(isAChildInRelationship.bind(null, personId)) + .map(relationship => getPersonFromMember(getHouseholdMemberByPersonId(getParentIdFromRelationship(relationship)))); +} + +export function getAllChildrenOf(personId) { + return getAllRelationships() + .filter(isAParentInRelationship.bind(null, personId)) + .map(relationship => getHouseholdMemberByPersonId(getChildIdFromRelationship(relationship))['@person']); +} + +export function getPersonIdFromPerson(person) { + return person.id; +} + +export function getPersonFromMember(member) { + return member['@person']; +} + +/** + * Missing relationship inference + */ +export const missingRelationshipInference = { + siblingsOf(subjectMember) { + + const missingRelationships = [], + allRelationships = getAllRelationships(), + person = getPersonFromMember(subjectMember), + personId = person.id, + + parents = getAllParentsOf(personId), + + siblingIds = allRelationships + .filter(isASiblingInRelationship.bind(null, personId)) + .map(getSiblingIdFromRelationship.bind(null, personId)); + + /** + * If 2 parent relationships of 'person' are found we can attempt to infer + * sibling relationships + */ + if (parents.length === 2) { + + getAllHouseholdMembers() + .filter(isHouseholdMember) + .forEach((member) => { + + const memberPersonId = member['@person'].id; + + /** + * Guard + * If member is the subject member + * or member is a parent + * or member already has a sibling relationship with 'person' + * skip member + */ + if (memberPersonId === personId || + memberPersonId === parents[0].id || memberPersonId === parents[1].id || + siblingIds.indexOf(memberPersonId) > -1) { + return; + } + + const memberParents = getAllParentsOf(memberPersonId); + + /** + * If 2 parents of 'member' are found + * and they are the same parents of 'person' + * we have identified a missing inferred relationship + */ + if (memberParents.length === 2 && + _.difference( + parents.map(getPersonIdFromPerson), + memberParents.map(getPersonIdFromPerson) + ).length === 0) { + + /** + * Add to missingRelationships + */ + missingRelationships.push(relationship( + 'brother-sister', + personId, + memberPersonId, + { + inferred: true, + inferredBy: [ + /** + * Must be 4 relationships + * Could have used member's parents but we can assume they + * must be the same at this point or the inferrence + * couldn't happen. + */ + getRelationshipOf(personId, parents[0].id).id, + getRelationshipOf(personId, parents[1].id).id, + getRelationshipOf(memberPersonId, parents[0].id).id, + getRelationshipOf(memberPersonId, parents[1].id).id + ] + } + )); + } + }); + } + + return missingRelationships; + } +}; + +export function inferRelationships(relationship, personIs, personTo) { + var missingRelationships = []; + + if (relationship.personIsDescription === 'mother-father') { + missingRelationships = missingRelationships.concat( + missingRelationshipInference.siblingsOf(personTo) + ); + } + + if (relationship.personIsDescription === 'son-daughter') { + missingRelationships = missingRelationships.concat( + missingRelationshipInference.siblingsOf(personIs) + ); + } + + $.each(missingRelationships, function(i, relationship) { + addRelationship(relationship); + }); +} + +export function findNextMissingRelationship() { + let householdMembers = getAllHouseholdMembers().filter(isHouseholdMember), + relationships = getAllRelationships(), + missingRelationshipMembers = [], + personIs = null; + + /** + * Find the next missing relationship + */ + $.each(householdMembers, function(i, member) { + const personId = member['@person'].id; + + /** + * Get all relationships for this member + */ + const memberRelationships = relationships.filter(function(relationship) { + return relationship.personIsId === personId || relationship.personToId === personId; + }), + + memberRelationshipToIds = memberRelationships.map(function(relationship) { + return relationship.personIsId === personId ? relationship.personToId : relationship.personIsId; + }) || []; + + /** + * If total relationships related to this member isn't equal to + * total household members -1, indicates missing relationship + */ + if (memberRelationships.length < householdMembers.length - 1) { + + /** + * All missing relationship members + */ + missingRelationshipMembers = householdMembers.filter(function(m) { + return memberRelationshipToIds.indexOf(m['@person'].id) === -1 && + m['@person'].id !== personId; + }); + + personIs = member; + + return false; + } + }); + + return personIs ? { + personIs: personIs, + personTo: missingRelationshipMembers[0] + } : null; +} + +export function getPeopleIdsMissingRelationshipsWithPerson(personId) { + const remainingPersonIds = getAllHouseholdMembers() + .filter(isHouseholdMember) + .map(function(member) { + return member['@person'].id; + }); + + /** + * Remove this person from the list + */ + removeFromList(remainingPersonIds, personId); + + $.each(getAllRelationships(), function(i, relationship) { + if (!isInRelationship(personId, relationship)) { + return; + } + + /** + * Remove the other person from the remainingPersonIds list + */ + removeFromList( + remainingPersonIds, + getOtherPersonIdFromRelationship(personId, relationship) + ); + }); + + return remainingPersonIds; +} + +export function getRelationshipType(relationship) { + return relationshipDescriptionMap[relationship.personIsDescription].type; +} + +/** + * Retrieve from relationship group + */ +export function getRelationshipsWithPersonIds(relationships, idArr) { + return relationships.filter(function(childRelationship) { + return idArr.indexOf(childRelationship.personIsId) !== -1 || + idArr.indexOf(childRelationship.personToId) !== -1; + }); +} + +export function getRelationshipOf(person1, person2) { + return getAllRelationships().find(function(relationship) { + return isInRelationship(person1, relationship) && + isInRelationship(person2, relationship); + }); +} diff --git a/_prototypes/your-household-v9-cy/assets/utils.js b/_prototypes/your-household-v9-cy/assets/utils.js new file mode 100644 index 0000000000..c0898a3d80 --- /dev/null +++ b/_prototypes/your-household-v9-cy/assets/utils.js @@ -0,0 +1,39 @@ +export function autoIncrementId(collection) { + let k = collection + '-increment', + id = parseInt(sessionStorage.getItem(k)) || 0; + + id++; + + sessionStorage.setItem(k, JSON.stringify(id)); + + return id; +} + +export function removeFromList(list, val) { + + function doRemove(item) { + var foundId = list.indexOf(item); + + /** + * Guard + */ + if (foundId === -1) { + console.log('Attempt to remove from list failed: ', list, val); + return; + } + + list.splice(foundId, 1); + } + + if (_.isArray(val)) { + $.each(val, function(i, item) { + doRemove(item); + }); + } else { + doRemove(val); + } +} + +export function trailingNameS(name) { + return name[name.length - 1] === 's' ? '\’' : '\’s'; +} diff --git a/_prototypes/your-household-v9-cy/bundle.js b/_prototypes/your-household-v9-cy/bundle.js new file mode 100644 index 0000000000..d7dba09e0e --- /dev/null +++ b/_prototypes/your-household-v9-cy/bundle.js @@ -0,0 +1,410 @@ +import { + RELATIONSHIPS_STORAGE_KEY, + relationshipDescriptionMap, + addRelationship, + deleteRelationship, + editRelationship, + getAllRelationships, + getAllManualRelationships, + deleteAllRelationshipsForMember, + relationshipSummaryTemplates, + missingRelationshipInference, + inferRelationships, + getAllParentsOf, + getAllChildrenOf, + getParentIdFromRelationship, + getChildIdFromRelationship, + getOtherPersonIdFromRelationship, + isAChildInRelationship, + isAParentInRelationship, + isInRelationship, + areAnyChildrenInRelationshipNotParent, + isRelationshipType, + isRelationshipInferred, + getRelationshipOf, + getRelationshipsWithPersonIds, + getPeopleIdsMissingRelationshipsWithPerson, + getRelationshipType, + findNextMissingRelationship, + relationship +} from './assets/relationships'; +import { + HOUSEHOLD_MEMBER_TYPE, + VISITOR_TYPE, + USER_HOUSEHOLD_MEMBER_ID, + HOUSEHOLD_MEMBERS_STORAGE_KEY, + addHouseholdMember, + updateHouseholdMember, + deleteHouseholdMember, + getAllHouseholdMembers, + getUserAsHouseholdMember, + getHouseholdMemberByPersonId, + getMemberPersonId, + updateUserAsHouseholdMember, + deleteUserAsHouseholdMember, + isVisitor, + isOtherHouseholdMember, + isHouseholdMember, + person, + tempAwayQuestionSentenceMap, + visitorQuestionSentenceMap +} from './assets/household'; +import { + addUpdatePersonalDetailsDOB, + getPersonalDetailsFor, + addUpdateMaritalStatus, + addUpdateCountry, + addUpdateOrientation, + addUpdateSalary, + + personalDetailsMaritalStatusMap, + personalDetailsCountryMap, + personalDetailsOrientationMap, + + createPinFor, + getPinFor, + unsetPinFor +} from './assets/personal-details'; +import {removeFromList, trailingNameS} from './assets/utils'; + +import { numberToPositionWord, numberToWordsStyleguide } from './assets/numbers-to-words'; + +import { tools } from './assets/prototype-tools'; + +export const USER_STORAGE_KEY = 'user-details'; +export const INDIVIDUAL_PROXY_STORAGE_KEY = 'proxy-person'; + +export function getAddress() { + let addressLines = sessionStorage.getItem('address').split(','); + + return { + addressLine1: addressLines[0], + addressLine2: addressLines[1], + addressLine3: addressLines[2], + addressCounty: addressLines[4], + addressTownCity: addressLines[3], + addressPostcode: addressLines[5] + } +} + +/** + * User + */ +export function addUserPerson(person) { + sessionStorage.setItem(USER_STORAGE_KEY, JSON.stringify(person)); +} + +export function getUserPerson() { + return JSON.parse(sessionStorage.getItem(USER_STORAGE_KEY)); +} + +/** + * Helpers + */ +function createNavItem(member) { + let $nodeEl = $(''), + $linkEl = $nodeEl.find('.js-template-nav-item-label'); + + $linkEl.html(member['@person'].fullName); + + if (member['@person'].id === USER_HOUSEHOLD_MEMBER_ID) { + $linkEl.attr('href', '../what-is-your-name'); + } else { + $linkEl.attr('href', '../who-else-to-add?edit=' + member['@person'].id); + } + + return $nodeEl; +} + +function updateHouseholdVisitorsNavigationItems() { + let allHouseholdMembers = window.ONS.storage.getAllHouseholdMembers(), + householdMembers = allHouseholdMembers.filter(window.ONS.storage.isHouseholdMember), + visitors = allHouseholdMembers.filter(window.ONS.storage.isVisitor); + + const $navigationHouseholdMembersEl = $('#navigation-household-members'), + $navigationVisitorsEl = $('#navigation-visitors'); + + if (householdMembers.length) { + $.each(householdMembers, function(i, member) { + $navigationHouseholdMembersEl.append(createNavItem(member)); + }); + } else { + $navigationHouseholdMembersEl.parent().hide(); + } + + if (visitors.length) { + $.each(visitors, function(i, member) { + $navigationVisitorsEl.append(createNavItem(member)); + }); + } else { + $navigationVisitorsEl.parent().hide(); + } +} + +function createListItemPerson(member) { + return $('
  • ').addClass('mars').html( + '' + + member['@person'].fullName + + (member['@person'].id === USER_HOUSEHOLD_MEMBER_ID ? ' (You)' : '') + + '' + ); +} + +function populateList($el, memberType) { + if (!$el.length) { + return; + } + + let members = getAllHouseholdMembers() || []; + + $el.empty().append(members.filter((member) => { + return member.type === memberType; + }).map(createListItemPerson)); + + $el.addClass('list list--people-plain'); +} + +function populateHouseholdList() { + populateList($('#household-members'), HOUSEHOLD_MEMBER_TYPE); +} + +function populateVisitorList() { + populateList($('#visitors-list'), VISITOR_TYPE); +} + +function updateAddresses() { + let addressLines = (sessionStorage.getItem('address') || '').split(','), + addressLine1 = addressLines[0], + addressLine2 = addressLines[1]; + + $('#section-address').html(addressLine1 || 'Address not' + + ' found'); + $('.address-text').html( + addressLine1 && addressLine2 + ? ( + addressLine1 + (addressLine2 ? ', ' + addressLine2 : '') + ) + : 'Address not found' + ); + + $('.address-text-line1').html(addressLine1); + + let personId = new URLSearchParams(window.location.search).get('person'), + person; + + if (personId) { + person = getHouseholdMemberByPersonId(personId)['@person']; + $('#section-individual').html(person.fullName); + + $('.js-person-fullname-from-url-id').html(person.fullName); + } +} + +const secureLinkTextMap = { + 'question-you': { + description: 'Want to keep your answers secure from other people at this' + + ' address?', + linkText: 'Get a separate access code to submit an individual response', + link: '../individual-decision-secure' + }, + 'pin-you': { + description: 'You\'ve chosen to keep your answers secure', + linkText: 'Cancel this and make answers available to the rest of the' + + ' household', + link: '../individual-decision-secure' + }, + 'question-proxy': { + description: 'Not happy to continue answering for $[NAME]?', + linkText: 'Request an individual access code to be sent to them', + link: '../individual-decision-other-secure' + } +}; + +function updateAllPreviousLinks() { + $('.js-previous-link').attr('href', document.referrer); +} + +function updatePersonLink() { + const personId = new URLSearchParams(window.location.search).get('person'); + + if (personId) { + let urlParam = new URLSearchParams(window.location.search), + person = getHouseholdMemberByPersonId(personId)['@person'], + pinObj = getPinFor(personId), + secureLinkTextConfig = secureLinkTextMap[ + (getAnsweringIndividualByProxy() ? 'question-proxy' : (pinObj && pinObj.pin ? 'pin-you' : 'question-you')) + ], + linkHref = secureLinkTextConfig.link + '?person=' + personId + + '&returnurl=' + window.location.pathname, + surveyType = urlParam.get('survey'); + + linkHref += (surveyType ? '&survey=' + surveyType : ''); + + let $secureLink = $('.js-link-secure'); + $secureLink.attr('href', linkHref); + + $secureLink.html(secureLinkTextConfig.linkText); + $('.js-link-secure-label').html(secureLinkTextConfig.description.replace('$[NAME]', person.fullName)); + + let personLink = $('.js-link-person'); + personLink.attr('href', personLink.attr('href') + '?person=' + personId + + (surveyType ? '&survey=' + surveyType : '')); + } +} + +function updateBySurveyType() { + const urlParams = new URLSearchParams(window.location.search), + surveyType = urlParams.get('survey'); + + if (surveyType) { + $('.js-header-title').html(surveyTypeConfig[surveyType].title); + $('#people-living-here').html(surveyTypeConfig[surveyType].householdSectionTitle); + $('#people-living-here').attr('href', surveyTypeConfig[surveyType].householdSectionLink); + $('#relationships-section').attr('href', surveyTypeConfig[surveyType].relationshipsSection); + $('title').html(surveyTypeConfig[surveyType].title); + } +} + +function setAnsweringIndividualByProxy(bool) { + sessionStorage.setItem(INDIVIDUAL_PROXY_STORAGE_KEY, JSON.stringify(bool)); +} + +function getAnsweringIndividualByProxy() { + return JSON.parse(sessionStorage.getItem(INDIVIDUAL_PROXY_STORAGE_KEY)); +} + +const surveyTypeConfig = { + lms: { + title: 'Online Household Study', + householdSectionTitle: 'About your household', + householdSectionLink: '../summary/?survey=lms', + relationshipsSection: '../relationships/?survey=lms' + } +}; + +function doILiveHere() { + return sessionStorage.getItem('lives-here') === 'yes'; +} + +function getSignificant() { + return '11 November 2018'; +} + +function updateSignificantDate() { + $('.js-significant-date').html(getSignificant()); +} + +window.ONS = window.ONS || {}; +window.ONS.storage = { + getAddress, + addHouseholdMember, + updateHouseholdMember, + deleteHouseholdMember, + getAllHouseholdMembers, + addUserPerson, + getUserPerson, + getUserAsHouseholdMember, + getHouseholdMemberByPersonId, + getMemberPersonId, + updateUserAsHouseholdMember, + deleteUserAsHouseholdMember, + tempAwayQuestionSentenceMap, + visitorQuestionSentenceMap, + + isVisitor, + isOtherHouseholdMember, + isHouseholdMember, + + addRelationship, + deleteRelationship, + editRelationship, + getAllRelationships, + getAllManualRelationships, + deleteAllRelationshipsForMember, + + getAllParentsOf, + getAllChildrenOf, + getParentIdFromRelationship, + getChildIdFromRelationship, + getOtherPersonIdFromRelationship, + isAParentInRelationship, + isAChildInRelationship, + isInRelationship, + areAnyChildrenInRelationshipNotParent, + isRelationshipType, + isRelationshipInferred, + getRelationshipOf, + + relationshipDescriptionMap, + relationshipSummaryTemplates, + missingRelationshipInference, + inferRelationships, + getRelationshipsWithPersonIds, + getPeopleIdsMissingRelationshipsWithPerson, + getRelationshipType, + findNextMissingRelationship, + + addUpdatePersonalDetailsDOB, + getPersonalDetailsFor, + addUpdateMaritalStatus, + addUpdateCountry, + addUpdateOrientation, + addUpdateSalary, + + personalDetailsMaritalStatusMap, + personalDetailsCountryMap, + personalDetailsOrientationMap, + + createPinFor, + getPinFor, + unsetPinFor, + + setAnsweringIndividualByProxy, + getAnsweringIndividualByProxy, + + doILiveHere, + + KEYS: { + HOUSEHOLD_MEMBERS_STORAGE_KEY, + USER_STORAGE_KEY, + INDIVIDUAL_PROXY_STORAGE_KEY, + HOUSEHOLD_MEMBER_TYPE, + VISITOR_TYPE, + RELATIONSHIPS_STORAGE_KEY + }, + + IDS: { + USER_HOUSEHOLD_MEMBER_ID + }, + + TYPES: { + person, + relationship + } +}; + +window.ONS.helpers = { + populateHouseholdList, + populateVisitorList +}; + +window.ONS.utils = { + removeFromList, + trailingNameS, + numberToPositionWord, + numberToWordsStyleguide, + getSignificant +}; + +$(populateHouseholdList); +$(populateVisitorList); +$(updateHouseholdVisitorsNavigationItems); +$(updateAddresses); +$(updatePersonLink); +$(tools); +$(updateAllPreviousLinks); +$(updateBySurveyType); +$(updateSignificantDate); diff --git a/_prototypes/your-household-v9-cy/confirm-address.html b/_prototypes/your-household-v9-cy/confirm-address.html new file mode 100644 index 0000000000..fb6725c303 --- /dev/null +++ b/_prototypes/your-household-v9-cy/confirm-address.html @@ -0,0 +1,95 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    + Can you confirm this address is correct? +

    +
    + +

    Address not + set

    + +
    +
    +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    + + + + + + + diff --git a/_prototypes/your-household-v9-cy/do-you-live-here.html b/_prototypes/your-household-v9-cy/do-you-live-here.html new file mode 100644 index 0000000000..7762ab24af --- /dev/null +++ b/_prototypes/your-household-v9-cy/do-you-live-here.html @@ -0,0 +1,120 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    + Do you usually live at ? +

    + +
    +
    +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + diff --git a/_prototypes/your-household-v9-cy/does-anyone-else-live-here.html b/_prototypes/your-household-v9-cy/does-anyone-else-live-here.html new file mode 100644 index 0000000000..cf3d614891 --- /dev/null +++ b/_prototypes/your-household-v9-cy/does-anyone-else-live-here.html @@ -0,0 +1,143 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +

    + Does anyone else live at ? +

    +
    + +
    + +
    +
    +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/hub.html b/_prototypes/your-household-v9-cy/hub.html new file mode 100644 index 0000000000..06c39ecd8f --- /dev/null +++ b/_prototypes/your-household-v9-cy/hub.html @@ -0,0 +1,249 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    + Survey progress +

    +
    + +
    + You have completed + the section + +

    In order to submit this + survey you need to complete all of + the following sections

    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    Completed
    +
    + +
    +
    +
    +
    +
    + +

    You can submit this survey once all of + the sections are complete

    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + diff --git a/_prototypes/your-household-v9-cy/i-dont-live-here.html b/_prototypes/your-household-v9-cy/i-dont-live-here.html new file mode 100644 index 0000000000..93fd924450 --- /dev/null +++ b/_prototypes/your-household-v9-cy/i-dont-live-here.html @@ -0,0 +1,116 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    + Does anyone usually live at ? +

    + +
    +
    +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + + + diff --git a/_prototypes/your-household-v9-cy/index.html b/_prototypes/your-household-v9-cy/index.html new file mode 100644 index 0000000000..96e23d5771 --- /dev/null +++ b/_prototypes/your-household-v9-cy/index.html @@ -0,0 +1,122 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + + + +
    +
    + +
    +
    +
    +
    + +
    +
    + + +
    +
    +
    +

    + Welcome to the household prototype +

    + +
    +
    +
    + + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + +

    The unique access code + is printed on your invitation + letter or form

    +
    +
    + +

    Your personal information is protected by law and will be kept confidential

    + +
    +
    +
    + + +
    +
    +
    +
    + + + + + diff --git a/_prototypes/your-household-v9-cy/individual-decision-other-pin.html b/_prototypes/your-household-v9-cy/individual-decision-other-pin.html new file mode 100644 index 0000000000..538a8dee81 --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-decision-other-pin.html @@ -0,0 +1,126 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    + + +
    +
    +
    +
    +

    + Send individual access code +

    +

    + You can request the access code to be + sent by text message to their mobile + phone, or we can post it to them. +

    +
    + +
    +
    +
    +
    +
    + + +
    + + +
    +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/individual-decision-other-secure.html b/_prototypes/your-household-v9-cy/individual-decision-other-secure.html new file mode 100644 index 0000000000..e5fb8cc9b9 --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-decision-other-secure.html @@ -0,0 +1,140 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    + + +
    +
    +
    +
    +

    + Are you happy to continue answering + for +

    +

    + This section asks you to provide + information about their age, marital + status, sexual orientation, health, + education and employment. +

    +

    + If you are not happy to answer these + questions and would like them to + complete their own section you can + request an individual access pin on + their behalf. +

    +
    + +
    +
    +
    +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/individual-decision-pin.html b/_prototypes/your-household-v9-cy/individual-decision-pin.html new file mode 100644 index 0000000000..0e4b497fd6 --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-decision-pin.html @@ -0,0 +1,112 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + + + +
    +
    + Previous +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +

    + Your individual access code +

    + +
    + 34567 +
    + +

    + Make a note of your access code as + you will need it to view or edit your + answers once you have signed out. +

    +

    + If you lose your code you won’t be + able to retrieve it and you’ll need + to enter your answers again. +

    +
    + +
    +
    + + +
    + + +
    +
    +
    +
    +
    +
    + + + + +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/individual-decision-secure.html b/_prototypes/your-household-v9-cy/individual-decision-secure.html new file mode 100644 index 0000000000..c6afd74085 --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-decision-secure.html @@ -0,0 +1,148 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    + + + +
    +
    +
    +
    +

    + Do you want to keep your answers + secure from other people at this + address? +

    +

    + We’ll provide you with a separate + access code if you don’t want other + people living at this address to view + your answers. +

    +

    + An example of this might be if you + live in a shared or student house. + You might not want other people to + have access to information about you + such as your age, marital status, + health, education and employment. +

    +
    + +
    +
    +
    +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/individual-decision.html b/_prototypes/your-household-v9-cy/individual-decision.html new file mode 100644 index 0000000000..767bd05427 --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-decision.html @@ -0,0 +1,122 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    + + +
    +
    +
    +
    +

    + Are you , or are you someone who is completing + the survey for ? +

    +
    + +
    +
    +
    +
    +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + + +

    Can't complete this question?
    + Choose another section and return to this later

    +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/individual-details-country.html b/_prototypes/your-household-v9-cy/individual-details-country.html new file mode 100644 index 0000000000..e4fa9810df --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-details-country.html @@ -0,0 +1,191 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    + + +
    +
    +
    +
    +

    + What is your country of birth? +

    +
    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + + +

    Can't complete this question?
    + Choose another section and + return to this later

    + +


    + Get a separate access code to submit an + individual response

    +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/individual-details-dob.html b/_prototypes/your-household-v9-cy/individual-details-dob.html new file mode 100644 index 0000000000..e7273e0760 --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-details-dob.html @@ -0,0 +1,167 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    + + +
    +
    +
    +
    +

    + What is your date of birth? +

    +

    For + example 20 March 1980

    +
    + +
    +
    +
    + +
    +
    + + +
    + +
    + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + + +

    Can't complete this question?
    + Choose another + section and + return + to this later

    + +


    + Get a separate access code to submit an + individual response

    +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/individual-details-orientation.html b/_prototypes/your-household-v9-cy/individual-details-orientation.html new file mode 100644 index 0000000000..a52387c0cd --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-details-orientation.html @@ -0,0 +1,186 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    + + +
    +
    +
    +
    +

    + Which of the following best describes your sexual orientation? +

    +
    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + + +

    Can't complete this question?
    + Choose another section and + return to this later

    + +


    + Get a separate access code to submit an + individual response

    +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/individual-details-relationship.html b/_prototypes/your-household-v9-cy/individual-details-relationship.html new file mode 100644 index 0000000000..e84396b568 --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-details-relationship.html @@ -0,0 +1,243 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    + + +
    +
    +
    +
    +

    + What is your legal marital or + same-sex civil partnership status? +

    +
    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + + +

    Can't complete this question?
    + Choose another section and + return + to this later

    + +


    + Get a separate access code to submit an + individual response

    +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/individual-details-salary.html b/_prototypes/your-household-v9-cy/individual-details-salary.html new file mode 100644 index 0000000000..fad3d00563 --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-details-salary.html @@ -0,0 +1,134 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    + + +
    +
    +
    +
    +

    + What was your gross pay, that is your + pay before any deductions, the last + time you were paid? +

    +
    + +
    +
    +

    + Exclude + expenses (if possible) +

    +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + + +

    Can't complete this question?
    + Choose another section and + return to this later

    + +


    + Get a separate access code to submit an + individual response

    +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/individual-details-summary.html b/_prototypes/your-household-v9-cy/individual-details-summary.html new file mode 100644 index 0000000000..47811dfded --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-details-summary.html @@ -0,0 +1,246 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + + + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    + +
    +
    +
    +
    +

    + Personal details +

    +
    + +
    + This sub section + is now complete +

    You can check your + answers below

    +
    +
    + +
    +
    +
    +
    +
    +
    Full name
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    Date of birth
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    Marital status
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    Country of birth
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    Sexual orientation
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    Salary
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + +


    + Get a separate access code to submit an + individual response

    +
    +
    +
    +
    +
    + + + + + diff --git a/_prototypes/your-household-v9-cy/individual-intro.html b/_prototypes/your-household-v9-cy/individual-intro.html new file mode 100644 index 0000000000..9c5de420c5 --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-intro.html @@ -0,0 +1,83 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.yourHouseholdV4_navigationItemsPersonalDetails + nav-title-id="section-individual" %} +
    +
    +
    +
    +
    +
    +

    + +

    In this sub section, we’re going to + ask you questions about . +

    + +

    Information you will need:

    +
      +
    • Personal details such as date of birth, country of birth, sexual orientation and religion etc.
    • +
    • Education and qualifications
    • +
    • Employment, income and travel to work
    • +
    • Second or holiday homes
    • +
    • Unpaid care, health and well-being
    • +
    + +

    Submitting an individual response

    +

    When completing this section, we will ask you if you would like to submit an + individual response. Choose this option if you don’t want other people at this address to view + your answers

    +
    +
    +
    + + +
    +
    +
    +
    + + + + + + + diff --git a/_prototypes/your-household-v9-cy/individual-pin-security.html b/_prototypes/your-household-v9-cy/individual-pin-security.html new file mode 100644 index 0000000000..3a634413d8 --- /dev/null +++ b/_prototypes/your-household-v9-cy/individual-pin-security.html @@ -0,0 +1,121 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +

    + Enter the individual access code +

    + +

    + You’ll need the code you were provided when you chose to submit an individual response. +

    + +
    + + +

    Help with individual access code

    + + +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/relationships-intro.html b/_prototypes/your-household-v9-cy/relationships-intro.html new file mode 100644 index 0000000000..e42df66a1a --- /dev/null +++ b/_prototypes/your-household-v9-cy/relationships-intro.html @@ -0,0 +1,69 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +

    Household relationships

    + +

    In this section, we’ll ask you how the people who usually live in this household are related to each other.

    + +

    For the displayed household members, select the appropriate relationship from the options shown. The selected relationship will display at the bottom of the page for you to check.

    +
    +
    +
    + + +
    +
    +
    +
    + + + + + + + diff --git a/_prototypes/your-household-v9-cy/relationships-person-select.html b/_prototypes/your-household-v9-cy/relationships-person-select.html new file mode 100644 index 0000000000..cc453558cd --- /dev/null +++ b/_prototypes/your-household-v9-cy/relationships-person-select.html @@ -0,0 +1,283 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +householdMembers: +visitors: +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    + Are any of the following household + members also + + ? +

    + + + + + +

    Select all that apply

    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + + +
    +
    + + + + diff --git a/_prototypes/your-household-v9-cy/relationships-summary-proxy.html b/_prototypes/your-household-v9-cy/relationships-summary-proxy.html new file mode 100644 index 0000000000..f806b3e72b --- /dev/null +++ b/_prototypes/your-household-v9-cy/relationships-summary-proxy.html @@ -0,0 +1,18 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +householdMembers: +visitors: +cdn: v1.5.0 +--- + + diff --git a/_prototypes/your-household-v9-cy/relationships-summary.html b/_prototypes/your-household-v9-cy/relationships-summary.html new file mode 100644 index 0000000000..614c5bc472 --- /dev/null +++ b/_prototypes/your-household-v9-cy/relationships-summary.html @@ -0,0 +1,1054 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +householdMembers: +visitors: +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + {% include navigation.html + items=site.data.your-household-v6.navigationItemsRelationships + nav-title-id="section-address" %} +
    +
    +
    +
    + +
    +
    +
    +

    + Relationships

    + +
    + This sub section is + now complete +
      +
    • You can check your answers below +
    • +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + +
    +
    +

    + + +

    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    +
    + + + + + + diff --git a/_prototypes/your-household-v9-cy/relationships.html b/_prototypes/your-household-v9-cy/relationships.html new file mode 100644 index 0000000000..fb04ce49a6 --- /dev/null +++ b/_prototypes/your-household-v9-cy/relationships.html @@ -0,0 +1,576 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +householdMembers: +visitors: +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    + ... +

    +

    + Complete the sentence by selecting + the appropriate relationship. +

    + +
    +
    +
    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + + + + diff --git a/_prototypes/your-household-v9-cy/section-intro.html b/_prototypes/your-household-v9-cy/section-intro.html new file mode 100644 index 0000000000..3eb7dd8374 --- /dev/null +++ b/_prototypes/your-household-v9-cy/section-intro.html @@ -0,0 +1,71 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    + +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +

    + +

    In this section, we're going to ask you about the people living at + .

    + +

    Information you will need:

    +
      +
    • Names of the people living at this address
    • +
    • Names of anyone who are temporarily away
    • +
    • Names of anyone staying at this address who has been or intends to be, in the UK for 3 months or more
    • +
    • Names of visitors staying at this address + on
    • +
    +
    +
    +
    + + +
    +
    +
    +
    + + + + + + + diff --git a/_prototypes/your-household-v9-cy/style.css b/_prototypes/your-household-v9-cy/style.css new file mode 100644 index 0000000000..c561320991 --- /dev/null +++ b/_prototypes/your-household-v9-cy/style.css @@ -0,0 +1,36 @@ +.list.list--people-plain { + margin-bottom : 1rem; + list-style-type : none; +} + +.list.list--people-plain .list__item { + background: url(/img/icons/person.svg) 0 .2rem no-repeat; +} + +.list.list--people-plain .list__item-name { + padding-left: 1.5rem; +} + +.list.list--people-plain .list__item-actions { + margin-top: -4px; +} + +.list.list--people-plain .list__item-action + .list__item-action { + margin-left : .5rem; +} + +/** + * Pattern library fix + */ +.header { + margin-bottom : 0; +} + +.lock { + padding-left : 1.5rem; + background : url('../img/icons/lockicon.svg') no-repeat left top; +} + +.footer { + margin-top : 7rem; +} diff --git a/_prototypes/your-household-v9-cy/summary.html b/_prototypes/your-household-v9-cy/summary.html new file mode 100644 index 0000000000..8f84fd7812 --- /dev/null +++ b/_prototypes/your-household-v9-cy/summary.html @@ -0,0 +1,318 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
    +
    + Previous +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +

    + People who live here and overnight visitors +

    +
    + +
    + This sub section is + now complete +
      +
    • You can check your answers below +
    • +
    +
    +
    + +

    You’ve added {n} household member

    +
      + +

      + + Add someone to this household +

      + +
      +

      You’ve added {n} visitor staying + overnight on

      +
        + +

        Add a visitor +

        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + + + + + + + + + + diff --git a/_prototypes/your-household-v9-cy/temp-away-from-home.html b/_prototypes/your-household-v9-cy/temp-away-from-home.html new file mode 100644 index 0000000000..2a1657def0 --- /dev/null +++ b/_prototypes/your-household-v9-cy/temp-away-from-home.html @@ -0,0 +1,101 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
        +
        + Previous +
        +
        + +
        +
        +
        + +
        +
        +
        +
        + + +
        +
        +
        + +
        +

        + Is there anyone else living at + + who is currently away? +

        +
        + +
          + +
          +
          +
          +
          + + +
          + +
          + + +
          +
          +
          +
          +
          +
          +
          + +
          +
          +
          +
          +
          + + + + diff --git a/_prototypes/your-household-v9-cy/temp-living-here-feedback.html b/_prototypes/your-household-v9-cy/temp-living-here-feedback.html new file mode 100644 index 0000000000..6a147c2066 --- /dev/null +++ b/_prototypes/your-household-v9-cy/temp-living-here-feedback.html @@ -0,0 +1,97 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
          +
          + Previous +
          +
          + +
          +
          +
          + +
          +
          +
          +
          + + +
          +
          +
          +
          +

          + Is there anyone else staying at + + who does not have another UK address? +

          +
          + +
            + +
            +
            +
            +
            + + +
            + +
            + + +
            +
            +
            +
            +
            +
            +
            + +
            +
            +
            +
            +
            + + + + diff --git a/_prototypes/your-household-v9-cy/temp-living-here.html b/_prototypes/your-household-v9-cy/temp-living-here.html new file mode 100644 index 0000000000..24587949d2 --- /dev/null +++ b/_prototypes/your-household-v9-cy/temp-living-here.html @@ -0,0 +1,111 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
            +
            + Previous +
            +
            + +
            +
            +
            + +
            +
            +
            +
            + + +
            +
            +
            +
            +

            + Is there anyone else staying at + + who does not have another UK address? +

            +
            + +
              + +
              +
              + Select all that apply: +
              Select all that apply:
              +
              + + +
              +
              + + +
              + +
              + + + +
              +
              +
              +
              +
              +
              + +
              +
              +
              +
              +
              + + + + diff --git a/_prototypes/your-household-v9-cy/temp-types-feedback.html b/_prototypes/your-household-v9-cy/temp-types-feedback.html new file mode 100644 index 0000000000..3751389b60 --- /dev/null +++ b/_prototypes/your-household-v9-cy/temp-types-feedback.html @@ -0,0 +1,135 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
              +
              + Previous +
              +
              + +
              +
              +
              + +
              +
              +
              +
              +
              +
              +
              +
              +

              + Is there anyone else apart from the people already included, who you need to add? +

              +
              + +
              +
              + Include + +
                +
                +
                + +
                + +
                +
                +
                +
                + + +
                + +
                + + +
                +
                +
                +
                +
                +
                +
                + +
                +
                +
                +
                +
                + + + +
                  +
                • +
                + + diff --git a/_prototypes/your-household-v9-cy/temp-types-living-away.html b/_prototypes/your-household-v9-cy/temp-types-living-away.html new file mode 100644 index 0000000000..70e0f92e71 --- /dev/null +++ b/_prototypes/your-household-v9-cy/temp-types-living-away.html @@ -0,0 +1,158 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
                +
                + Previous +
                +
                + +
                +
                +
                + +
                +
                +
                +
                + +
                +
                +
                +
                +

                + +

                +
                + +
                  + +
                  +
                  + Select all that apply: +
                  Select all that apply:
                  +
                  + +
                  + + + +
                  +
                  +
                  +
                  +
                  +
                  +
                  + + + +

                  Why do we ask this question?

                  + +
                  +
                  +

                  We ask this question to check that everyone is correctly counted on the census. This may include people who are staying temporarily or are away.

                  +
                  + +
                  +
                  + +
                  +
                  +
                  +
                  +
                  + + + +
                  +
                  + + +
                  +
                  + + diff --git a/_prototypes/your-household-v9-cy/temp-types-question.html b/_prototypes/your-household-v9-cy/temp-types-question.html new file mode 100644 index 0000000000..e7700c30e0 --- /dev/null +++ b/_prototypes/your-household-v9-cy/temp-types-question.html @@ -0,0 +1,162 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
                  +
                  + Previous +
                  +
                  + +
                  +
                  +
                  + +
                  +
                  +
                  +
                  + +
                  +
                  +
                  +
                  +

                  + Who do you need to add? +

                  +
                  + +
                  +
                  + Include + +
                    +
                    +
                    + +
                      + +
                      + What is your name? + +
                      +
                      + + +
                      + +
                      + + +
                      +
                      +
                      +
                      +
                      +
                      + +
                      +
                      +
                      +
                      +
                      + + + +
                        +
                      • +
                      + + diff --git a/_prototypes/your-household-v9-cy/test-address.html b/_prototypes/your-household-v9-cy/test-address.html new file mode 100644 index 0000000000..8d55e959c1 --- /dev/null +++ b/_prototypes/your-household-v9-cy/test-address.html @@ -0,0 +1,227 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + + + +
                      +
                      + +
                      +
                      +
                      +
                      + +
                      +
                      + + +
                      +
                      +
                      +

                      + What is your address? +

                      + +
                      + + What is your address? + + +
                      +
                      +
                      +
                      +
                      + + + + +
                      +
                      +
                      +
                      + +
                      +
                      +
                      +
                      + + + +
                      +
                      +
                      +
                      + +
                      +
                      +
                      +
                      + + + +
                      +
                      +
                      +
                      + +
                      +
                      +
                      +
                      + + + +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      + + +
                      +
                      +
                      +
                      + + + + + diff --git a/_prototypes/your-household-v9-cy/test-data.html b/_prototypes/your-household-v9-cy/test-data.html new file mode 100644 index 0000000000..ac76568cbb --- /dev/null +++ b/_prototypes/your-household-v9-cy/test-data.html @@ -0,0 +1,42 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
                      +
                      + Previous +
                      +
                      + +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      + +
                      +
                      +
                      + + +
                      +
                      +
                      +
                      + + + + diff --git a/_prototypes/your-household-v9-cy/visitors.html b/_prototypes/your-household-v9-cy/visitors.html new file mode 100644 index 0000000000..13ca482c10 --- /dev/null +++ b/_prototypes/your-household-v9-cy/visitors.html @@ -0,0 +1,147 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
                      + +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      +
                      + + +
                      +
                      +
                      +
                      +

                      + Are there any visitors staying + overnight on at + ? +

                      +
                      + +
                      +
                      +
                      +
                      + Select all that apply: +
                      Select all that apply:
                      +
                      + + +
                      +
                      + + +
                      +
                      + + +
                      + +
                      + + +
                      + +
                      + + + +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      + +
                      + + + +

                      Why do I have to include my visitors?

                      + +
                      +
                      +

                      We ask for visitor information to check that everyone is counted. This helps to produce accurate population estimates. Add any visitors, even if you think they may have been counted elsewhere.

                      +
                      + +
                      +
                      + + +
                      +
                      +
                      +
                      +
                      + + + + diff --git a/_prototypes/your-household-v9-cy/what-is-your-name.html b/_prototypes/your-household-v9-cy/what-is-your-name.html new file mode 100644 index 0000000000..bde27c9637 --- /dev/null +++ b/_prototypes/your-household-v9-cy/what-is-your-name.html @@ -0,0 +1,134 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
                      +
                      + Previous +
                      +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      + + +
                      +
                      + +
                      +

                      + What is your name? +

                      + +
                      + What is your name? + +
                      +
                      + + +
                      + +
                      + + +
                      +
                      +
                      +
                      +
                      +
                      + + +
                      +
                      +
                      +
                      + + + + + diff --git a/_prototypes/your-household-v9-cy/who-else-to-add.html b/_prototypes/your-household-v9-cy/who-else-to-add.html new file mode 100644 index 0000000000..4e65619133 --- /dev/null +++ b/_prototypes/your-household-v9-cy/who-else-to-add.html @@ -0,0 +1,237 @@ +--- +title: Household prototype v9 +project: your-household +globalcss: false +layout: eq-default-extras +cdn: v1.5.0 +--- + + +
                      +
                      + Previous +
                      +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      + + +
                      +
                      + +
                      +

                      + Who do you need to add to ? +

                      +
                      + + + +
                      + +
                      + What is your name? + +
                      +
                      + + +
                      + +
                      + + +
                      +
                      +
                      +
                      + + +
                      + + +
                      +
                      +
                      +
                      + + + + + From f103fe0d2f09280732f3f1aebe7ee2d3fe42af15 Mon Sep 17 00:00:00 2001 From: Shane Edwards Date: Wed, 14 Nov 2018 16:48:08 +0000 Subject: [PATCH 2/8] Your household v9 welsh - First part translations --- _includes/header-eq-default.html | 3 +-- _prototypes/your-household-v9-cy/bundle.js | 2 +- .../your-household-v9-cy/confirm-address.html | 13 ++++++------ .../do-you-live-here.html | 17 +++++++--------- .../does-anyone-else-live-here.html | 6 +++--- _prototypes/your-household-v9-cy/hub.html | 2 +- .../i-dont-live-here.html | 6 +++--- _prototypes/your-household-v9-cy/index.html | 2 +- .../individual-decision-other-pin.html | 6 +++--- .../individual-decision-other-secure.html | 6 +++--- .../individual-decision-pin.html | 4 ++-- .../individual-decision-secure.html | 6 +++--- .../individual-decision.html | 6 +++--- .../individual-details-country.html | 6 +++--- .../individual-details-dob.html | 6 +++--- .../individual-details-orientation.html | 6 +++--- .../individual-details-relationship.html | 6 +++--- .../individual-details-salary.html | 6 +++--- .../individual-details-summary.html | 4 ++-- .../individual-intro.html | 4 ++-- .../individual-pin-security.html | 4 ++-- .../relationships-intro.html | 2 +- .../relationships-person-select.html | 6 +++--- .../relationships-summary-proxy.html | 2 +- .../relationships-summary.html | 4 ++-- .../your-household-v9-cy/relationships.html | 6 +++--- .../your-household-v9-cy/section-intro.html | 17 ++++++++-------- _prototypes/your-household-v9-cy/summary.html | 4 ++-- .../temp-away-from-home.html | 6 +++--- .../temp-living-here-feedback.html | 6 +++--- .../temp-living-here.html | 6 +++--- .../temp-types-feedback.html | 6 +++--- .../temp-types-living-away.html | 6 +++--- .../temp-types-question.html | 6 +++--- .../your-household-v9-cy/test-address.html | 20 ++++++++----------- .../your-household-v9-cy/test-data.html | 4 ++-- .../your-household-v9-cy/visitors.html | 6 +++--- .../what-is-your-name.html | 14 ++++++------- .../your-household-v9-cy/who-else-to-add.html | 6 +++--- 39 files changed, 119 insertions(+), 129 deletions(-) diff --git a/_includes/header-eq-default.html b/_includes/header-eq-default.html index 1770fdb41d..2933cb2d18 100644 --- a/_includes/header-eq-default.html +++ b/_includes/header-eq-default.html @@ -26,8 +26,7 @@ {{ site.title }} {% endif %} - + diff --git a/_prototypes/your-household-v9-cy/bundle.js b/_prototypes/your-household-v9-cy/bundle.js index d7dba09e0e..e4525c224a 100644 --- a/_prototypes/your-household-v9-cy/bundle.js +++ b/_prototypes/your-household-v9-cy/bundle.js @@ -290,7 +290,7 @@ function doILiveHere() { } function getSignificant() { - return '11 November 2018'; + return '11 noviembre 2018'; } function updateSignificantDate() { diff --git a/_prototypes/your-household-v9-cy/confirm-address.html b/_prototypes/your-household-v9-cy/confirm-address.html index fb6725c303..b28ee2e662 100644 --- a/_prototypes/your-household-v9-cy/confirm-address.html +++ b/_prototypes/your-household-v9-cy/confirm-address.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -26,7 +26,7 @@

                      - Can you confirm this address is correct? + Allwch chi gadarnhau bod y cyfeiriad hwn yn gywir?

                      @@ -40,14 +40,13 @@

                      - +
                      - +
                      @@ -61,7 +60,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/do-you-live-here.html b/_prototypes/your-household-v9-cy/do-you-live-here.html index 7762ab24af..d2904fcd56 100644 --- a/_prototypes/your-household-v9-cy/do-you-live-here.html +++ b/_prototypes/your-household-v9-cy/do-you-live-here.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -30,8 +30,8 @@

                      - Do you usually live at ? + Ydych chi'n byw yn fel arfer?

                      @@ -44,9 +44,7 @@

                      id="yes">

                      @@ -57,8 +55,7 @@

                      id="no">

                      @@ -69,7 +66,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/does-anyone-else-live-here.html b/_prototypes/your-household-v9-cy/does-anyone-else-live-here.html index cf3d614891..d3bb25d7f6 100644 --- a/_prototypes/your-household-v9-cy/does-anyone-else-live-here.html +++ b/_prototypes/your-household-v9-cy/does-anyone-else-live-here.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -75,7 +75,7 @@ diff --git a/_prototypes/your-household-v9-cy/hub.html b/_prototypes/your-household-v9-cy/hub.html index 06c39ecd8f..511a76ec06 100644 --- a/_prototypes/your-household-v9-cy/hub.html +++ b/_prototypes/your-household-v9-cy/hub.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras diff --git a/_prototypes/your-household-v9-cy/i-dont-live-here.html b/_prototypes/your-household-v9-cy/i-dont-live-here.html index 93fd924450..9a76a4efd7 100644 --- a/_prototypes/your-household-v9-cy/i-dont-live-here.html +++ b/_prototypes/your-household-v9-cy/i-dont-live-here.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -72,7 +72,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/index.html b/_prototypes/your-household-v9-cy/index.html index 96e23d5771..ed0b7d4d09 100644 --- a/_prototypes/your-household-v9-cy/index.html +++ b/_prototypes/your-household-v9-cy/index.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras diff --git a/_prototypes/your-household-v9-cy/individual-decision-other-pin.html b/_prototypes/your-household-v9-cy/individual-decision-other-pin.html index 538a8dee81..b617094e5f 100644 --- a/_prototypes/your-household-v9-cy/individual-decision-other-pin.html +++ b/_prototypes/your-household-v9-cy/individual-decision-other-pin.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -85,7 +85,7 @@ diff --git a/_prototypes/your-household-v9-cy/individual-decision-other-secure.html b/_prototypes/your-household-v9-cy/individual-decision-other-secure.html index e5fb8cc9b9..1fa795b042 100644 --- a/_prototypes/your-household-v9-cy/individual-decision-other-secure.html +++ b/_prototypes/your-household-v9-cy/individual-decision-other-secure.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -92,7 +92,7 @@ diff --git a/_prototypes/your-household-v9-cy/individual-decision-pin.html b/_prototypes/your-household-v9-cy/individual-decision-pin.html index 0e4b497fd6..41966f1442 100644 --- a/_prototypes/your-household-v9-cy/individual-decision-pin.html +++ b/_prototypes/your-household-v9-cy/individual-decision-pin.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -20,7 +20,7 @@ diff --git a/_prototypes/your-household-v9-cy/individual-decision-secure.html b/_prototypes/your-household-v9-cy/individual-decision-secure.html index c6afd74085..ff1a8e6242 100644 --- a/_prototypes/your-household-v9-cy/individual-decision-secure.html +++ b/_prototypes/your-household-v9-cy/individual-decision-secure.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -95,7 +95,7 @@ diff --git a/_prototypes/your-household-v9-cy/individual-decision.html b/_prototypes/your-household-v9-cy/individual-decision.html index 767bd05427..c233f28ed1 100644 --- a/_prototypes/your-household-v9-cy/individual-decision.html +++ b/_prototypes/your-household-v9-cy/individual-decision.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -74,7 +74,7 @@

                      Can't complete this question?
                      diff --git a/_prototypes/your-household-v9-cy/individual-details-country.html b/_prototypes/your-household-v9-cy/individual-details-country.html index e4fa9810df..23beb85699 100644 --- a/_prototypes/your-household-v9-cy/individual-details-country.html +++ b/_prototypes/your-household-v9-cy/individual-details-country.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@

                      @@ -122,7 +122,7 @@

                      Can't complete this question?
                      diff --git a/_prototypes/your-household-v9-cy/individual-details-dob.html b/_prototypes/your-household-v9-cy/individual-details-dob.html index e7273e0760..ffab53ddb9 100644 --- a/_prototypes/your-household-v9-cy/individual-details-dob.html +++ b/_prototypes/your-household-v9-cy/individual-details-dob.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@

                      @@ -88,7 +88,7 @@

                      Can't complete this question?
                      diff --git a/_prototypes/your-household-v9-cy/individual-details-orientation.html b/_prototypes/your-household-v9-cy/individual-details-orientation.html index a52387c0cd..39747e8eab 100644 --- a/_prototypes/your-household-v9-cy/individual-details-orientation.html +++ b/_prototypes/your-household-v9-cy/individual-details-orientation.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@

                      @@ -117,7 +117,7 @@

                      Can't complete this question?
                      diff --git a/_prototypes/your-household-v9-cy/individual-details-relationship.html b/_prototypes/your-household-v9-cy/individual-details-relationship.html index e84396b568..f16f58d754 100644 --- a/_prototypes/your-household-v9-cy/individual-details-relationship.html +++ b/_prototypes/your-household-v9-cy/individual-details-relationship.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@

                      @@ -173,7 +173,7 @@

                      Can't complete this question?
                      diff --git a/_prototypes/your-household-v9-cy/individual-details-salary.html b/_prototypes/your-household-v9-cy/individual-details-salary.html index fad3d00563..8d268c7c43 100644 --- a/_prototypes/your-household-v9-cy/individual-details-salary.html +++ b/_prototypes/your-household-v9-cy/individual-details-salary.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@

                      @@ -66,7 +66,7 @@

                      Can't complete this question?
                      diff --git a/_prototypes/your-household-v9-cy/individual-details-summary.html b/_prototypes/your-household-v9-cy/individual-details-summary.html index 47811dfded..87f725bb2b 100644 --- a/_prototypes/your-household-v9-cy/individual-details-summary.html +++ b/_prototypes/your-household-v9-cy/individual-details-summary.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/individual-intro.html b/_prototypes/your-household-v9-cy/individual-intro.html index 9c5de420c5..7f126f6737 100644 --- a/_prototypes/your-household-v9-cy/individual-intro.html +++ b/_prototypes/your-household-v9-cy/individual-intro.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ diff --git a/_prototypes/your-household-v9-cy/individual-pin-security.html b/_prototypes/your-household-v9-cy/individual-pin-security.html index 3a634413d8..4de6a021b8 100644 --- a/_prototypes/your-household-v9-cy/individual-pin-security.html +++ b/_prototypes/your-household-v9-cy/individual-pin-security.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ diff --git a/_prototypes/your-household-v9-cy/relationships-intro.html b/_prototypes/your-household-v9-cy/relationships-intro.html index e42df66a1a..19542c7f23 100644 --- a/_prototypes/your-household-v9-cy/relationships-intro.html +++ b/_prototypes/your-household-v9-cy/relationships-intro.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras diff --git a/_prototypes/your-household-v9-cy/relationships-person-select.html b/_prototypes/your-household-v9-cy/relationships-person-select.html index cc453558cd..01e57cf753 100644 --- a/_prototypes/your-household-v9-cy/relationships-person-select.html +++ b/_prototypes/your-household-v9-cy/relationships-person-select.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false householdMembers: @@ -11,7 +11,7 @@ @@ -72,7 +72,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/relationships-summary-proxy.html b/_prototypes/your-household-v9-cy/relationships-summary-proxy.html index f806b3e72b..bea70ac93c 100644 --- a/_prototypes/your-household-v9-cy/relationships-summary-proxy.html +++ b/_prototypes/your-household-v9-cy/relationships-summary-proxy.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false householdMembers: diff --git a/_prototypes/your-household-v9-cy/relationships-summary.html b/_prototypes/your-household-v9-cy/relationships-summary.html index 614c5bc472..a5dc59af8b 100644 --- a/_prototypes/your-household-v9-cy/relationships-summary.html +++ b/_prototypes/your-household-v9-cy/relationships-summary.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false householdMembers: @@ -11,7 +11,7 @@ diff --git a/_prototypes/your-household-v9-cy/relationships.html b/_prototypes/your-household-v9-cy/relationships.html index fb04ce49a6..7a3fbd6765 100644 --- a/_prototypes/your-household-v9-cy/relationships.html +++ b/_prototypes/your-household-v9-cy/relationships.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false householdMembers: @@ -11,7 +11,7 @@ @@ -201,7 +201,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/section-intro.html b/_prototypes/your-household-v9-cy/section-intro.html index 3eb7dd8374..42ac14ee75 100644 --- a/_prototypes/your-household-v9-cy/section-intro.html +++ b/_prototypes/your-household-v9-cy/section-intro.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -28,23 +28,22 @@ id="total-retail-turnover-section">

                      -

                      In this section, we're going to ask you about the people living at +

                      Yn yr adran hon, byddwn yn gofyn i chi am y bobl sy'n byw yn .

                      -

                      Information you will need:

                      +

                      Gwybodaeth y bydd ei hangen arnoch:

                        -
                      • Names of the people living at this address
                      • -
                      • Names of anyone who are temporarily away
                      • -
                      • Names of anyone staying at this address who has been or intends to be, in the UK for 3 months or more
                      • -
                      • Names of visitors staying at this address - on
                      • +
                      • Enwau'r bobl sy'n byw yn y cyfeiriad hwn
                      • +
                      • Enwau unrhyw un sydd oddi cartref dros dro
                      • +
                      • Enwau unrhyw un sy'n aros yn y cyfeiriad hwn sydd wedi bod, neu sy'n bwriadu bod, yn y DU am 3 mis neu fwy
                      • +
                      • Enwau ymwelwyr sy'n aros yn y cyfeiriad hwn ar
                      diff --git a/_prototypes/your-household-v9-cy/summary.html b/_prototypes/your-household-v9-cy/summary.html index 8f84fd7812..6060c75597 100644 --- a/_prototypes/your-household-v9-cy/summary.html +++ b/_prototypes/your-household-v9-cy/summary.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ diff --git a/_prototypes/your-household-v9-cy/temp-away-from-home.html b/_prototypes/your-household-v9-cy/temp-away-from-home.html index 2a1657def0..ca687be19b 100644 --- a/_prototypes/your-household-v9-cy/temp-away-from-home.html +++ b/_prototypes/your-household-v9-cy/temp-away-from-home.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -10,7 +10,7 @@
                      Previous + href="../does-anyone-else-live-here">Yn flaenorol
                      @@ -79,7 +79,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/temp-living-here-feedback.html b/_prototypes/your-household-v9-cy/temp-living-here-feedback.html index 6a147c2066..fef77682dc 100644 --- a/_prototypes/your-household-v9-cy/temp-living-here-feedback.html +++ b/_prototypes/your-household-v9-cy/temp-living-here-feedback.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -75,7 +75,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/temp-living-here.html b/_prototypes/your-household-v9-cy/temp-living-here.html index 24587949d2..6d87ba5330 100644 --- a/_prototypes/your-household-v9-cy/temp-living-here.html +++ b/_prototypes/your-household-v9-cy/temp-living-here.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -83,7 +83,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/temp-types-feedback.html b/_prototypes/your-household-v9-cy/temp-types-feedback.html index 3751389b60..9e5f409c94 100644 --- a/_prototypes/your-household-v9-cy/temp-types-feedback.html +++ b/_prototypes/your-household-v9-cy/temp-types-feedback.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -75,7 +75,7 @@ diff --git a/_prototypes/your-household-v9-cy/temp-types-living-away.html b/_prototypes/your-household-v9-cy/temp-types-living-away.html index 70e0f92e71..cd1d063f3f 100644 --- a/_prototypes/your-household-v9-cy/temp-types-living-away.html +++ b/_prototypes/your-household-v9-cy/temp-types-living-away.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -10,7 +10,7 @@
                      Previous + href="../does-anyone-else-live-here">Yn flaenorol
                      @@ -86,7 +86,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/temp-types-question.html b/_prototypes/your-household-v9-cy/temp-types-question.html index e7700c30e0..83af837f71 100644 --- a/_prototypes/your-household-v9-cy/temp-types-question.html +++ b/_prototypes/your-household-v9-cy/temp-types-question.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -10,7 +10,7 @@
                      Previous + href="../does-anyone-else-live-here">Yn flaenorol
                      @@ -81,7 +81,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/test-address.html b/_prototypes/your-household-v9-cy/test-address.html index 8d55e959c1..6f625d2a87 100644 --- a/_prototypes/your-household-v9-cy/test-address.html +++ b/_prototypes/your-household-v9-cy/test-address.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -49,14 +49,13 @@ id="what-is-your-address-question">

                      - What is your address? + Beth yw eich cyfeiriad?

                      - What is your address? - + Beth yw eich cyfeiriad?
                      @@ -68,7 +67,7 @@ for="address-line-1" id="label-address-line-1">
                      - Building and street + Adeilad a stryd
                      - Town or City - + Tref neu Ddinas
                      @@ -121,8 +119,7 @@ for="county" id="label-county">
                      - County (optional) - + Sir (dewisol)
                      @@ -145,8 +142,7 @@ for="postcode" id="label-postcode">
                      - Postcode - + Cod post
                      @@ -168,7 +164,7 @@
                      diff --git a/_prototypes/your-household-v9-cy/test-data.html b/_prototypes/your-household-v9-cy/test-data.html index ac76568cbb..5f13fc5877 100644 --- a/_prototypes/your-household-v9-cy/test-data.html +++ b/_prototypes/your-household-v9-cy/test-data.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ diff --git a/_prototypes/your-household-v9-cy/visitors.html b/_prototypes/your-household-v9-cy/visitors.html index 13ca482c10..274366c9ee 100644 --- a/_prototypes/your-household-v9-cy/visitors.html +++ b/_prototypes/your-household-v9-cy/visitors.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -10,7 +10,7 @@
                      - Previous + Yn flaenorol
                      @@ -120,7 +120,7 @@

                      diff --git a/_prototypes/your-household-v9-cy/what-is-your-name.html b/_prototypes/your-household-v9-cy/what-is-your-name.html index bde27c9637..35b37033bb 100644 --- a/_prototypes/your-household-v9-cy/what-is-your-name.html +++ b/_prototypes/your-household-v9-cy/what-is-your-name.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -9,7 +9,7 @@ @@ -34,19 +34,19 @@

                      - What is your name? + Beth yw eich enw?

                      - What is your name? + Beth yw eich enw?
                      - Save and continue + Cadw a pharhau
                      diff --git a/_prototypes/your-household-v9-cy/who-else-to-add.html b/_prototypes/your-household-v9-cy/who-else-to-add.html index 4e65619133..d5cee10e5b 100644 --- a/_prototypes/your-household-v9-cy/who-else-to-add.html +++ b/_prototypes/your-household-v9-cy/who-else-to-add.html @@ -1,5 +1,5 @@ --- -title: Household prototype v9 +title: Household prototype v9 - Welsh project: your-household globalcss: false layout: eq-default-extras @@ -10,7 +10,7 @@
                      Previous + href="../does-anyone-else-live-here">Yn flaenorol
                      @@ -108,7 +108,7 @@
                      From 2596739eb97d0c9164b8ed5924e85351b7489f1d Mon Sep 17 00:00:00 2001 From: Shane Edwards Date: Thu, 15 Nov 2018 12:18:52 +0000 Subject: [PATCH 3/8] Your household v9 Welsh - Translations added for the first part of who lives here journey --- .../your-household-v9-cy/assets/household.js | 38 +++++++------ _prototypes/your-household-v9-cy/bundle.js | 3 +- .../do-you-live-here.html | 2 +- .../does-anyone-else-live-here.html | 49 ++++++++++++----- _prototypes/your-household-v9-cy/hub.html | 2 +- .../i-dont-live-here.html | 22 +++++--- .../individual-decision-other-pin.html | 2 +- .../individual-decision-other-secure.html | 2 +- .../individual-decision-pin.html | 2 +- .../individual-decision-secure.html | 2 +- .../individual-decision.html | 2 +- .../individual-details-country.html | 2 +- .../individual-details-dob.html | 2 +- .../individual-details-orientation.html | 2 +- .../individual-details-relationship.html | 2 +- .../individual-details-salary.html | 2 +- .../individual-details-summary.html | 2 +- .../individual-intro.html | 2 +- .../individual-pin-security.html | 2 +- .../relationships-intro.html | 2 +- .../relationships-person-select.html | 2 +- .../relationships-summary.html | 2 +- .../your-household-v9-cy/relationships.html | 2 +- .../your-household-v9-cy/section-intro.html | 2 +- _prototypes/your-household-v9-cy/summary.html | 2 +- .../temp-away-from-home.html | 2 +- .../temp-living-here-feedback.html | 2 +- .../temp-living-here.html | 2 +- .../temp-types-feedback.html | 14 +++-- .../temp-types-living-away.html | 36 ++++++++---- .../temp-types-question.html | 12 ++-- .../your-household-v9-cy/test-data.html | 2 +- .../your-household-v9-cy/visitors.html | 55 +++++++++++++------ .../what-is-your-name.html | 2 +- .../your-household-v9-cy/who-else-to-add.html | 33 +++++++---- 35 files changed, 199 insertions(+), 115 deletions(-) diff --git a/_prototypes/your-household-v9-cy/assets/household.js b/_prototypes/your-household-v9-cy/assets/household.js index db907f8449..e641b04c4c 100644 --- a/_prototypes/your-household-v9-cy/assets/household.js +++ b/_prototypes/your-household-v9-cy/assets/household.js @@ -117,22 +117,28 @@ export function isOtherHouseholdMember(member) { } export const tempAwayQuestionSentenceMap = { - 'three-more': 'People who usually live outside the UK who are staying in the UK for 3 months or more', - 'perm-away': 'People who work away from home within the UK, if this is' + - ' their permanent or family home', - 'armed-forces': 'Members of the armed forces, if this is their permanent or' + - ' family home', - 'less-twelve': 'People who are temporarily outside the UK for less than 12' + - ' months', - 'usually-temp': 'People staying temporarily who usually live in the UK but' + - ' do not have another UK address, for example, relatives, friends', - 'other': 'Other people who usually live here, including anyone temporarily' + - ' away from home' + 'three-more': `Pobl sy'n byw y tu allan i'r Deyrnas Unedig fel arfer, ond sy'n + aros yn y Deyrnas Unedig am 3 mis neu fwy`, + 'perm-away': `Pobl sy'n gweithio oddi cartref yn y Deyrnas Unedig, os mai hwn + yw eu cartref parhaol neu gartref y teulu`, + 'armed-forces': `Aelodau o'r lluoedd arfog, os mai hwn yw eu cartref parhaol + neu gartref y teulu`, + 'less-twelve': `Pobl sydd y tu allan i’r Deyrnas Unedig dros dro am lai na 12 + mis`, + 'usually-temp': `Pobl sy'n aros yma dros dro, sy'n byw yn y Deyrnas Unedig fel + arfer, ond sydd heb gyfeiriad arall yn y Deyrnas Unedig, er enghraifft + perthnasau, ffrindiau`, + 'other': `Pobl eraill sy’n byw yma fel arfer, gan gynnwys unrhyw un sydd oddi + cartref dros dro` }; export const visitorQuestionSentenceMap = { - 'usually-in-uk': 'People who usually live somewhere else in the UK, for example boy/girlfriends, friends or relatives', - 'second-address': 'People staying here because it is their second address, for example, for work. Their permanent or family home is elsewhere', - 'less-three': 'People who usually live outside the UK who are staying in the UK for less than three months', - 'on-holiday': 'People here on holiday', -} + 'usually-in-uk': `Pobl sydd fel arfer yn byw rywle arall yn y Deyrnas Unedig, + er enghraifft cariadon, ffrindiau neu berthnasau`, + 'second-address': `Pobl sy'n aros yma gan mai dyma eu hail gyfeiriad, er + enghraifft, oherwydd gwaith. Mae eu cartref parhaol neu gartref y teulu + rywle arall`, + 'less-three': `Pobl sy'n byw y tu allan i’r Deyrnas Unedig fel arfer, ond sy'n + aros yn y Deyrnas Unedig am lai na 3 mis`, + 'on-holiday': 'Pobl sydd ar wyliau yma' +}; diff --git a/_prototypes/your-household-v9-cy/bundle.js b/_prototypes/your-household-v9-cy/bundle.js index e4525c224a..36370681eb 100644 --- a/_prototypes/your-household-v9-cy/bundle.js +++ b/_prototypes/your-household-v9-cy/bundle.js @@ -290,7 +290,7 @@ function doILiveHere() { } function getSignificant() { - return '11 noviembre 2018'; + return '11 Tachwedd 2018'; } function updateSignificantDate() { @@ -408,3 +408,4 @@ $(tools); $(updateAllPreviousLinks); $(updateBySurveyType); $(updateSignificantDate); + diff --git a/_prototypes/your-household-v9-cy/do-you-live-here.html b/_prototypes/your-household-v9-cy/do-you-live-here.html index d2904fcd56..34d6d39666 100644 --- a/_prototypes/your-household-v9-cy/do-you-live-here.html +++ b/_prototypes/your-household-v9-cy/do-you-live-here.html @@ -81,7 +81,7 @@

                      - + +
                      @@ -32,7 +46,7 @@

                      - Does anyone else live at ?

                      @@ -52,11 +66,17 @@ for="yes-someone-else" id="yes-someone-else-label"> Yes, I need to - add - another person - Include partners, children, babies born on or before , housemates, tenants and lodgers, students and schoolchildren who live away from home during term time, where this is their permanent or family home + class="yes-answer">Oes, mae angen i mi ychwanegu rhywun arall + + Dylech gynnwys + partneriaid, plant, + babanod a aned ar + neu cyn hynny, + cydletywyr, tenantiaid a lojers, + myfyrwyr a phlant ysgol sy'n byw + oddi cartref yn ystod y tymor, os + mai dyma eu cartref parhaol neu + gartref y teulu.
                      @@ -66,7 +86,8 @@ name="does-anyone-else-live-here" id="no" value="no"> + for="no">Nac oes, nid oes angen i mi + ychwanegu unrhyw un

                      @@ -83,7 +104,7 @@ - + diff --git a/_prototypes/your-household-v9-cy/hub.html b/_prototypes/your-household-v9-cy/hub.html index 511a76ec06..c626407829 100644 --- a/_prototypes/your-household-v9-cy/hub.html +++ b/_prototypes/your-household-v9-cy/hub.html @@ -129,7 +129,7 @@

                      - + - + + + + + + + + + + + - + + + + + + - + + +