diff --git a/source/jsonnet/northern-ireland/census_household.jsonnet b/source/jsonnet/northern-ireland/census_household.jsonnet index 7f02f8ea..546476f1 100644 --- a/source/jsonnet/northern-ireland/census_household.jsonnet +++ b/source/jsonnet/northern-ireland/census_household.jsonnet @@ -105,6 +105,7 @@ local main_job_type = import 'individual/blocks/employment/main_job_type.jsonnet local place_of_work = import 'individual/blocks/employment/place_of_work.jsonnet'; local place_of_work_elsewhere = import 'individual/blocks/employment/place_of_work_elsewhere.jsonnet'; local supervise = import 'individual/blocks/employment/supervise.jsonnet'; +local town_and_county = import 'individual/blocks/employment/town_and_county.jsonnet'; local work_location = import 'individual/blocks/employment/work_location.jsonnet'; local work_location_type = import 'individual/blocks/employment/work_location_type.jsonnet'; local work_travel = import 'individual/blocks/employment/work_travel.jsonnet'; @@ -400,6 +401,7 @@ function(region_code) { work_location_type, place_of_work, place_of_work_elsewhere, + town_and_county, work_location, work_travel, ], diff --git a/source/jsonnet/northern-ireland/census_individual.jsonnet b/source/jsonnet/northern-ireland/census_individual.jsonnet index d128e0cb..0fc45c62 100644 --- a/source/jsonnet/northern-ireland/census_individual.jsonnet +++ b/source/jsonnet/northern-ireland/census_individual.jsonnet @@ -79,6 +79,7 @@ local main_job_type = import 'individual/blocks/employment/main_job_type.jsonnet local place_of_work = import 'individual/blocks/employment/place_of_work.jsonnet'; local place_of_work_elsewhere = import 'individual/blocks/employment/place_of_work_elsewhere.jsonnet'; local supervise = import 'individual/blocks/employment/supervise.jsonnet'; +local town_and_county = import 'individual/blocks/employment/town_and_county.jsonnet'; local work_location = import 'individual/blocks/employment/work_location.jsonnet'; local work_location_type = import 'individual/blocks/employment/work_location_type.jsonnet'; local work_travel = import 'individual/blocks/employment/work_travel.jsonnet'; @@ -205,6 +206,7 @@ function(region_code) { work_location_type, place_of_work, place_of_work_elsewhere, + town_and_county, work_location, work_travel, ], diff --git a/source/jsonnet/northern-ireland/individual/blocks/employment/place_of_work_elsewhere.jsonnet b/source/jsonnet/northern-ireland/individual/blocks/employment/place_of_work_elsewhere.jsonnet index 5f19f437..22a6107f 100644 --- a/source/jsonnet/northern-ireland/individual/blocks/employment/place_of_work_elsewhere.jsonnet +++ b/source/jsonnet/northern-ireland/individual/blocks/employment/place_of_work_elsewhere.jsonnet @@ -54,6 +54,58 @@ local pastProxyTitle = { }, ], routing_rules: [ + { + goto: { + block: 'work-town-and-county', + when: [ + { + id: 'place-of-work-elsewhere-answer', + condition: 'equals any', + values: [ + 'Carlow', + 'Cavan', + 'Clare', + 'Connaught', + 'Cork', + 'Donegal', + 'Dublin', + 'Eire', + 'Galway', + 'Ireland', + 'Ireland (Republic)', + 'Ireland (Southern)', + 'Irish Free State', + 'Irish Republic', + 'Kerry', + 'Kildare', + 'Kilkenny', + 'Laois', + 'Leinster', + 'Leitrim', + 'Limerick', + 'Longford', + 'Louth', + 'Mayo', + 'Meath', + 'Monaghan', + 'Munster', + 'Offaly', + 'Republic of Ireland', + 'RoI', + 'Roscommon', + 'Sligo', + 'Southern Ireland', + 'Tipperary', + 'Waterford', + 'Westmeath', + 'Wexford', + 'Wicklow', + 'South of Ireland', + ], + }, + ], + }, + }, { goto: { block: 'work-travel', diff --git a/source/jsonnet/northern-ireland/individual/blocks/employment/town_and_county.jsonnet b/source/jsonnet/northern-ireland/individual/blocks/employment/town_and_county.jsonnet new file mode 100644 index 00000000..8da8fa6b --- /dev/null +++ b/source/jsonnet/northern-ireland/individual/blocks/employment/town_and_county.jsonnet @@ -0,0 +1,70 @@ +local placeholders = import '../../../lib/placeholders.libsonnet'; +local rules = import 'rules.libsonnet'; + +local question(title) = { + id: 'work-town-and-county-question', + title: title, + type: 'General', + answers: [ + { + id: 'work-town-and-county-answer-town', + label: 'Town or city', + mandatory: false, + max_length: 100, + type: 'TextField', + }, + { + id: 'work-town-and-county-answer-county', + label: 'County', + mandatory: false, + max_length: 100, + type: 'TextField', + }, + ], +}; + +local nonProxyTitle = 'In which town and county is your main place of work?'; +local proxyTitle = { + text: 'In which town and county is {person_name_possessive} main place of work?', + placeholders: [ + placeholders.personNamePossessive, + ], +}; + +local pastNonProxyTitle = 'In which town and county was your main place of work?'; +local pastProxyTitle = { + text: 'In which town and county was {person_name_possessive} main place of work?', + placeholders: [ + placeholders.personNamePossessive, + ], +}; + +{ + type: 'Question', + id: 'work-town-and-county', + question_variants: [ + { + question: question(nonProxyTitle), + when: [rules.isNotProxy, rules.mainJob], + }, + { + question: question(proxyTitle), + when: [rules.isProxy, rules.mainJob], + }, + { + question: question(pastNonProxyTitle), + when: [rules.isNotProxy], + }, + { + question: question(pastProxyTitle), + when: [rules.isProxy], + }, + ], + routing_rules: [ + { + goto: { + block: 'work-travel', + }, + }, + ], +} diff --git a/translations/census_household_gb_nir.pot b/translations/census_household_gb_nir.pot index ba06b6ca..cc430fc8 100644 --- a/translations/census_household_gb_nir.pot +++ b/translations/census_household_gb_nir.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2020-06-30 15:59+0100\n" +"POT-Creation-Date: 2020-07-02 10:15+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1182,6 +1182,26 @@ msgstr "" msgid "In which country was {person_name_possessive} main place of work?" msgstr "" +#. Question text +msgid "In which town and county is your main place of work?" +msgstr "" + +#. Question text +msgid "" +"In which town and county is {person_name_possessive} main place " +"of work?" +msgstr "" + +#. Question text +msgid "In which town and county was your main place of work?" +msgstr "" + +#. Question text +msgid "" +"In which town and county was {person_name_possessive} main place" +" of work?" +msgstr "" + #. Question text msgid "What is the address of your main place of work?" msgstr "" @@ -2584,6 +2604,54 @@ msgctxt "In which country was {person_name_possessive} main place of wo msgid "Current name of country" msgstr "" +#. Answer +msgctxt "In which town and county is your main place of work?" +msgid "Town or city" +msgstr "" + +#. Answer +msgctxt "In which town and county is your main place of work?" +msgid "County" +msgstr "" + +#. Answer +msgctxt "" +"In which town and county is {person_name_possessive} main place " +"of work?" +msgid "Town or city" +msgstr "" + +#. Answer +msgctxt "" +"In which town and county is {person_name_possessive} main place " +"of work?" +msgid "County" +msgstr "" + +#. Answer +msgctxt "In which town and county was your main place of work?" +msgid "Town or city" +msgstr "" + +#. Answer +msgctxt "In which town and county was your main place of work?" +msgid "County" +msgstr "" + +#. Answer +msgctxt "" +"In which town and county was {person_name_possessive} main place" +" of work?" +msgid "Town or city" +msgstr "" + +#. Answer +msgctxt "" +"In which town and county was {person_name_possessive} main place" +" of work?" +msgid "County" +msgstr "" + #. Answer msgctxt "What is the address of your main place of work?" msgid "Address line 1" diff --git a/translations/census_individual_gb_nir.pot b/translations/census_individual_gb_nir.pot index 1bce21a3..66da250e 100644 --- a/translations/census_individual_gb_nir.pot +++ b/translations/census_individual_gb_nir.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2020-06-30 15:59+0100\n" +"POT-Creation-Date: 2020-07-02 10:15+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -836,6 +836,26 @@ msgstr "" msgid "In which country was {person_name_possessive} main place of work?" msgstr "" +#. Question text +msgid "In which town and county is your main place of work?" +msgstr "" + +#. Question text +msgid "" +"In which town and county is {person_name_possessive} main place " +"of work?" +msgstr "" + +#. Question text +msgid "In which town and county was your main place of work?" +msgstr "" + +#. Question text +msgid "" +"In which town and county was {person_name_possessive} main place" +" of work?" +msgstr "" + #. Question text msgid "What is the address of your main place of work?" msgstr "" @@ -1800,6 +1820,54 @@ msgctxt "In which country was {person_name_possessive} main place of wo msgid "Current name of country" msgstr "" +#. Answer +msgctxt "In which town and county is your main place of work?" +msgid "Town or city" +msgstr "" + +#. Answer +msgctxt "In which town and county is your main place of work?" +msgid "County" +msgstr "" + +#. Answer +msgctxt "" +"In which town and county is {person_name_possessive} main place " +"of work?" +msgid "Town or city" +msgstr "" + +#. Answer +msgctxt "" +"In which town and county is {person_name_possessive} main place " +"of work?" +msgid "County" +msgstr "" + +#. Answer +msgctxt "In which town and county was your main place of work?" +msgid "Town or city" +msgstr "" + +#. Answer +msgctxt "In which town and county was your main place of work?" +msgid "County" +msgstr "" + +#. Answer +msgctxt "" +"In which town and county was {person_name_possessive} main place" +" of work?" +msgid "Town or city" +msgstr "" + +#. Answer +msgctxt "" +"In which town and county was {person_name_possessive} main place" +" of work?" +msgid "County" +msgstr "" + #. Answer msgctxt "What is the address of your main place of work?" msgid "Address line 1"