From 07ee80a6757beeeb95d4c055f10d2938f93b1647 Mon Sep 17 00:00:00 2001 From: RobJN Date: Fri, 24 Jun 2022 21:35:23 +0100 Subject: [PATCH] Update uk_addresses.json --- assets/themes/uk_addresses/uk_addresses.json | 140 +++++++++++++++---- 1 file changed, 116 insertions(+), 24 deletions(-) diff --git a/assets/themes/uk_addresses/uk_addresses.json b/assets/themes/uk_addresses/uk_addresses.json index 1a7b93ea6c..e034f14c29 100644 --- a/assets/themes/uk_addresses/uk_addresses.json +++ b/assets/themes/uk_addresses/uk_addresses.json @@ -256,17 +256,24 @@ }, { "id": "uk_addresses_unit", - "render": "{addr:unit}", + "render": "
Sub-unit (e.g. 1, Flat 2, Unit C)
{addr:unit}
", "question": { - "en": "What is the sub-unit for this address?
Some named building or large complexes are split into sub-units (e.g. \"1\", \"Flat 2\", \"Unit C\")
" + "en": "What is the sub-unit for this address?
Some named building or large complexes are split into sub-units
" }, "freeform": { "key": "addr:unit", - "addExtraTags": [ - "not:addr:unit=" - ] + "placeholder": "Sub-unit (e.g. 1, Flat 2, Unit C)", + "addExtraTags": ["not:addr:unit="] }, "mappings": [ + { + "if": "not:addr:unit=yes", + "then": "
Sub-unit (e.g. 1, Flat 2, Unit C)
There is no sub-unit within this address
", + "addExtraTags": [ + "addr:unit=" + ], + "hideInAnswer": true + }, { "if": "not:addr:unit=yes", "then": "There is no sub-unit within this address", @@ -276,7 +283,7 @@ }, { "if": "addr:unit=", - "then": "
Sub-unit (e.g. \"1\", \"Flat 2\", \"Unit C\")
", + "then": "
Sub-unit (e.g. 1, Flat 2, Unit C)
", "hideInAnswer": true } ], @@ -290,15 +297,26 @@ }, { "id": "uk_addresses_housename", - "question": "What is the house or building name for this address?
As shown on a sign (e.g. \"Rose Cottage\", \"Broadcasting House\", \"Acme Corp HQ\"). Please do NOT add names of the people who live here!
", - "render": "{addr:housename}", + "question": "What is the house or building name for this address?
As shown on a sign. Please do NOT add names of the people who live here!
", + "render": "
House or building name
{addr:housename}
", "freeform": { "key": "addr:housename", + "placeholder": "Name (e.g. Rose Cottage, Broadcasting House, Acme Corp HQ)", "addExtraTags": [ "nohousename=" ] }, "mappings": [ + { + "if": { + "and": [ + "nohousename=yes", + "addr:housename=" + ] + }, + "then": "
House or building name
This building has no housename
", + "hideInAnswer": true + }, { "if": { "and": [ @@ -323,17 +341,28 @@ }, { "id": "uk_addresses_housenumber", - "render": "{addr:housenumber}", + "render": "
Number (e.g. 1, 1A, 2)
{addr:housenumber}
", "question": { "en": "What is the house or building number for this address?" }, "freeform": { "key": "addr:housenumber", + "placeholder": "Number (e.g. 1, 1A, 2)", "addExtraTags": [ "nohousenumber=" ] }, "mappings": [ + { + "if": "nohousenumber=yes", + "then": { + "en": "
Number (e.g. 1, 1A, 2)
This building has no house number
" + }, + "addExtraTags": [ + "addr:housenumber=" + ], + "hideInAnswer": true + }, { "if": "nohousenumber=yes", "then": { @@ -350,19 +379,32 @@ { "id": "uk_addresses_placename", "question": { - "en": "What is the place or locality for this address?
This is additional information that appears before (or instead of) a street name in the address (e.g. \"The Cross\", \"West Business Park\", \"Castle Mews\")
" + "en": "What is the place or locality for this address?
This is additional information that appears before (or instead of) a street name in the address
" }, "render": { - "en": "{addr:substreet}" + "en": "
Place (e.g. Castle Mews, West Business Park)
{addr:substreet}
" }, "freeform": { "key": "addr:substreet", + "placeholder": "Place (e.g. The Cross, West Business Park, Castle Mews)", "addExtraTags": [ + "not:addr:parentstreet=", "addr:parentstreet:={addr:street}", - "addr:street=" + "addr:street=", + "not:addr:substreet=" ] }, "mappings": [ + { + "if": "not:addr:substreet=yes", + "then": { + "en": "
Place (e.g. Castle Mews, West Business Park)
No extra place name is given or needed
" + }, + "addExtraTags": [ + "addr:substreet=" + ], + "hideInAnswer": true + }, { "if": "not:addr:substreet=yes", "then": { @@ -375,7 +417,7 @@ { "if": "addr:substreet=", "then": { - "en": "
Place (e.g. \"Castle Mews\", \"West Business Park\")
" + "en": "
Place (e.g. Castle Mews, West Business Park)
" }, "hideInAnswer": true } @@ -385,19 +427,30 @@ { "id": "uk_addresses_placename_with_parent", "question": { - "en": "What is the place or locality for this address?
This is additional information that appears before (or instead of) a street name in the address (e.g. \"The Cross\", \"West Business Park\", \"Castle Mews\")
" + "en": "What is the place or locality for this address?
This is additional information that appears before (or instead of) a street name in the address
" }, "render": { - "en": "{addr:substreet}" + "en": "
Place (e.g. Castle Mews, West Business Park)
{addr:substreet}
" }, "freeform": { "key": "addr:substreet", + "placeholder": "Place (e.g. The Cross, West Business Park, Castle Mews)", "addExtraTags": [ "addr:street=", "not:addr:substreet=" ] }, "mappings": [ + { + "if": "not:addr:substreet=yes", + "then": { + "en": "
Place (e.g. Castle Mews, West Business Park)
No extra place name is given or needed
" + }, + "addExtraTags": [ + "addr:substreet=" + ], + "hideInAnswer": true + }, { "if": "not:addr:substreet=yes", "then": { @@ -410,7 +463,7 @@ { "if": "addr:substreet=", "then": { - "en": "
Place (e.g. \"Castle Mews\", \"West Business Park\")
" + "en": "
Place (e.g. Castle Mews, West Business Park)
" }, "hideInAnswer": true } @@ -435,14 +488,30 @@ }, { "id": "uk_addresses_street", - "render": "{addr:street}", + "render": "
Street name
{addr:street}
", "question": { "en": "What is the street name for this address?" }, "freeform": { - "key": "addr:street" + "key": "addr:street", + "placeholder": "Other (please specify)" }, "mappings": [ + { + "if": "addr:street:={_closest_street:0:name}", + "then": "
Street name
{_closest_street:0:name}
", + "hideInAnswer": true + }, + { + "if": "addr:street:={_closest_street:1:name}", + "then": "
Street name
{_closest_street:1:name}
", + "hideInAnswer": true + }, + { + "if": "addr:street:={_closest_street:2:name}", + "then": "
Street name
{_closest_street:2:name}
", + "hideInAnswer": true + }, { "if": "addr:street:={_closest_street:0:name}", "then": "{_closest_street:0:name}", @@ -468,17 +537,24 @@ }, { "id": "uk_addresses_parentstreet", - "render": "{addr:parentstreet}", + "render": "
Parent street name
{addr:parentstreet}
", "question": { "en": "What is the parent street name for this address?
This street name will appear after the place name or first street name in the address
" }, "freeform": { "key": "addr:parentstreet", - "addExtraTags": [ - "not:addr:parentstreet=" - ] + "placeholder": "Other (please specify)", + "addExtraTags": ["not:addr:parentstreet="] }, "mappings": [ + { + "if": "not:addr:parentstreet=yes", + "then": "
Parent street name
No parent street name is needed within this address
", + "addExtraTags": [ + "addr:parentstreet=" + ], + "hideInAnswer": true + }, { "if": "not:addr:parentstreet=yes", "then": "No parent street name is needed within this address", @@ -486,6 +562,21 @@ "addr:parentstreet=" ] }, + { + "if": "addr:parentstreet:={_closest_street:0:name}", + "then": "
Parent street name
{_closest_street:0:name}
", + "hideInAnswer": true + }, + { + "if": "addr:parentstreet:={_closest_street:1:name}", + "then": "
Parent street name
{_closest_street:1:name}
", + "hideInAnswer": true + }, + { + "if": "addr:parentstreet:={_closest_street:2:name}", + "then": "
Parent street name
{_closest_street:2:name}
", + "hideInAnswer": true + }, { "if": "addr:parentstreet:={_closest_street:0:name}", "then": "{_closest_street:0:name}", @@ -523,7 +614,8 @@ "en": "Please explain what the address is so that someone else can look at it" }, "freeform": { - "key": "fixme:addr" + "key": "fixme:addr", + "placeholder": "Type here..." }, "mappings": [ { @@ -601,4 +693,4 @@ ], "enableShareScreen": false, "enableMoreQuests": false -} \ No newline at end of file +}