Skip to content

Commit

Permalink
Standardize on one access_simple field that includes "yes" option
Browse files Browse the repository at this point in the history
(closes #4383)

`access_toilets` used to be the only one with the "yes" option,
now it's not needed.
  • Loading branch information
bhousel committed Oct 2, 2017
1 parent b0c50bc commit a20cc8e
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 34 deletions.
3 changes: 0 additions & 3 deletions data/presets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions data/presets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 1 addition & 11 deletions data/presets/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion data/presets/fields/access_simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"key": "access",
"type": "combo",
"label": "Allowed Access",
"options": ["permissive", "private", "customers", "no"]
"options": ["yes", "permissive", "private", "customers", "no"]
}
6 changes: 0 additions & 6 deletions data/presets/fields/access_toilets.json

This file was deleted.

6 changes: 3 additions & 3 deletions data/presets/presets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2594,7 +2594,7 @@
"icon": "poi-storage-tank",
"fields": [
"operator",
"access_toilets",
"access_simple",
"fee",
"water_point"
],
Expand Down Expand Up @@ -2953,7 +2953,7 @@
"toilets/disposal",
"operator",
"building_area",
"access_toilets",
"access_simple",
"gender",
"fee",
"diaper"
Expand Down Expand Up @@ -16105,7 +16105,7 @@
"fields": [
"name",
"operator",
"access_toilets",
"access_simple",
"fee",
"water_point"
],
Expand Down
2 changes: 1 addition & 1 deletion data/presets/presets/amenity/sanitary_dump_station.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"icon": "poi-storage-tank",
"fields": [
"operator",
"access_toilets",
"access_simple",
"fee",
"water_point"
],
Expand Down
2 changes: 1 addition & 1 deletion data/presets/presets/amenity/toilets.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"toilets/disposal",
"operator",
"building_area",
"access_toilets",
"access_simple",
"gender",
"fee",
"diaper"
Expand Down
2 changes: 1 addition & 1 deletion data/presets/presets/waterway/sanitary_dump_station.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"fields": [
"name",
"operator",
"access_toilets",
"access_simple",
"fee",
"water_point"
],
Expand Down
3 changes: 0 additions & 3 deletions dist/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1097,9 +1097,6 @@
"access_simple": {
"label": "Allowed Access"
},
"access_toilets": {
"label": "Access"
},
"access": {
"label": "Allowed Access",
"placeholder": "Not Specified",
Expand Down

0 comments on commit a20cc8e

Please sign in to comment.