From a20cc8ed3f53ba5d1043942ad7876d99e152690f Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 2 Oct 2017 08:49:32 -0400 Subject: [PATCH] Standardize on one access_simple field that includes "yes" option (closes #4383) `access_toilets` used to be the only one with the "yes" option, now it's not needed. --- data/presets.yaml | 3 --- data/presets/README.md | 8 ++++---- data/presets/fields.json | 12 +----------- data/presets/fields/access_simple.json | 2 +- data/presets/fields/access_toilets.json | 6 ------ data/presets/presets.json | 6 +++--- .../presets/amenity/sanitary_dump_station.json | 2 +- data/presets/presets/amenity/toilets.json | 2 +- .../presets/waterway/sanitary_dump_station.json | 2 +- dist/locales/en.json | 3 --- 10 files changed, 12 insertions(+), 34 deletions(-) delete mode 100644 data/presets/fields/access_toilets.json diff --git a/data/presets.yaml b/data/presets.yaml index 342e839ad..d6b71e60d 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -80,9 +80,6 @@ en: access_simple: # access=* label: Allowed Access - access_toilets: - # access=* - label: Access address: # 'addr:block_number=*, addr:city=*, addr:block_number=*, addr:conscriptionnumber=*, addr:county=*, addr:country=*, addr:county=*, addr:district=*, addr:floor=*, addr:hamlet=*, addr:housename=*, addr:housenumber=*, addr:neighbourhood=*, addr:place=*, addr:postcode=*, addr:province=*, addr:quarter=*, addr:state=*, addr:street=*, addr:subdistrict=*, addr:suburb=*, addr:unit=*' label: Address diff --git a/data/presets/README.md b/data/presets/README.md index c154d4182..95e3a0200 100644 --- a/data/presets/README.md +++ b/data/presets/README.md @@ -70,10 +70,10 @@ Fields are reusable form elements that can be associated with presets. Fields are defined in JSON files located under `data/presets/fields`. The field files are typically named according to their associated OSM key. -For example, the field for the tag `access=*` is stored in the file -`data/presets/fields/access.json`. Note that there are exceptions to this rule -for fields that might work differently depending on which preset is active -(`access_simple.json`, `access_toilets.json`). +For example, the field for the tag `sport=*` is stored in the file +`data/presets/fields/sport.json`. When a field has multiple versions that +depend on which preset is active, we add a suffix to the filename: +(`sport.json`, `sport_ice.json`, `sport_racing_motor.json`). Some keys in OSM are namespaced using colons (':'). Namespaced fields are nested in folders according to their tag. diff --git a/data/presets/fields.json b/data/presets/fields.json index 178323b75..2c3bcc800 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -5,23 +5,13 @@ "type": "combo", "label": "Allowed Access", "options": [ + "yes", "permissive", "private", "customers", "no" ] }, - "access_toilets": { - "key": "access", - "type": "combo", - "label": "Access", - "options": [ - "yes", - "permissive", - "private", - "customers" - ] - }, "access": { "keys": [ "access", diff --git a/data/presets/fields/access_simple.json b/data/presets/fields/access_simple.json index e7cc59374..fa6bcbf83 100644 --- a/data/presets/fields/access_simple.json +++ b/data/presets/fields/access_simple.json @@ -2,5 +2,5 @@ "key": "access", "type": "combo", "label": "Allowed Access", - "options": ["permissive", "private", "customers", "no"] + "options": ["yes", "permissive", "private", "customers", "no"] } diff --git a/data/presets/fields/access_toilets.json b/data/presets/fields/access_toilets.json deleted file mode 100644 index 27ef6ab38..000000000 --- a/data/presets/fields/access_toilets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "key": "access", - "type": "combo", - "label": "Access", - "options": ["yes", "permissive", "private", "customers"] -} diff --git a/data/presets/presets.json b/data/presets/presets.json index 2408f8913..6867c1aef 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -2594,7 +2594,7 @@ "icon": "poi-storage-tank", "fields": [ "operator", - "access_toilets", + "access_simple", "fee", "water_point" ], @@ -2953,7 +2953,7 @@ "toilets/disposal", "operator", "building_area", - "access_toilets", + "access_simple", "gender", "fee", "diaper" @@ -16105,7 +16105,7 @@ "fields": [ "name", "operator", - "access_toilets", + "access_simple", "fee", "water_point" ], diff --git a/data/presets/presets/amenity/sanitary_dump_station.json b/data/presets/presets/amenity/sanitary_dump_station.json index 77c057d55..159d7f0bc 100644 --- a/data/presets/presets/amenity/sanitary_dump_station.json +++ b/data/presets/presets/amenity/sanitary_dump_station.json @@ -2,7 +2,7 @@ "icon": "poi-storage-tank", "fields": [ "operator", - "access_toilets", + "access_simple", "fee", "water_point" ], diff --git a/data/presets/presets/amenity/toilets.json b/data/presets/presets/amenity/toilets.json index 38273f24b..f09751cb8 100644 --- a/data/presets/presets/amenity/toilets.json +++ b/data/presets/presets/amenity/toilets.json @@ -4,7 +4,7 @@ "toilets/disposal", "operator", "building_area", - "access_toilets", + "access_simple", "gender", "fee", "diaper" diff --git a/data/presets/presets/waterway/sanitary_dump_station.json b/data/presets/presets/waterway/sanitary_dump_station.json index f06773283..b7f3d4edc 100644 --- a/data/presets/presets/waterway/sanitary_dump_station.json +++ b/data/presets/presets/waterway/sanitary_dump_station.json @@ -3,7 +3,7 @@ "fields": [ "name", "operator", - "access_toilets", + "access_simple", "fee", "water_point" ], diff --git a/dist/locales/en.json b/dist/locales/en.json index 5447debf4..be43857fb 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1097,9 +1097,6 @@ "access_simple": { "label": "Allowed Access" }, - "access_toilets": { - "label": "Access" - }, "access": { "label": "Allowed Access", "placeholder": "Not Specified",