Skip to content

Commit

Permalink
Support access=permit in access and access_simple fields
Browse files Browse the repository at this point in the history
(closes #5223)
  • Loading branch information
bhousel committed Aug 13, 2018
1 parent 64b34e8 commit 121287f
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 25 deletions.
19 changes: 12 additions & 7 deletions data/presets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,42 @@ en:
options:
designated:
# access=designated
description: Access permitted according to signs or specific local laws
description: Access allowed according to signs or specific local laws
# access=designated
title: Designated
destination:
# access=destination
description: Access permitted only to reach a destination
description: Access allowed only to reach a destination
# access=destination
title: Destination
dismount:
# access=dismount
description: Access permitted but rider must dismount
description: Access allowed but rider must dismount
# access=dismount
title: Dismount
'no':
# access=no
description: Access not permitted to the general public
description: Access not allowed to the general public
# access=no
title: Prohibited
permissive:
# access=permissive
description: Access permitted until such time as the owner revokes the permission
description: Access allowed until such time as the owner revokes the permission
# access=permissive
title: Permissive
permit:
# access=permit
description: Access allowed only with a valid permit or license
# access=permit
title: Permit
private:
# access=private
description: Access permitted only with permission of the owner on an individual basis
description: Access allowed only with permission of the owner on an individual basis
# access=private
title: Private
'yes':
# access=yes
description: Access permitted by law; a right of way
description: Access allowed by law; a right of way
# access=yes
title: Allowed
# access field placeholder
Expand Down
4 changes: 2 additions & 2 deletions data/presets/fields.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fields": {
"access_simple": {"key": "access", "type": "combo", "label": "Allowed Access", "options": ["yes", "permissive", "private", "customers", "no"]},
"access": {"keys": ["access", "foot", "motor_vehicle", "bicycle", "horse"], "reference": {"key": "access"}, "type": "access", "label": "Allowed Access", "placeholder": "Not Specified", "strings": {"types": {"access": "All", "foot": "Foot", "motor_vehicle": "Motor Vehicles", "bicycle": "Bicycles", "horse": "Horses"}, "options": {"yes": {"title": "Allowed", "description": "Access permitted by law; a right of way"}, "no": {"title": "Prohibited", "description": "Access not permitted to the general public"}, "permissive": {"title": "Permissive", "description": "Access permitted until such time as the owner revokes the permission"}, "private": {"title": "Private", "description": "Access permitted only with permission of the owner on an individual basis"}, "designated": {"title": "Designated", "description": "Access permitted according to signs or specific local laws"}, "destination": {"title": "Destination", "description": "Access permitted only to reach a destination"}, "dismount": {"title": "Dismount", "description": "Access permitted but rider must dismount"}}}},
"access_simple": {"key": "access", "type": "combo", "label": "Allowed Access", "options": ["yes", "permissive", "private", "customers", "permit", "no"]},
"access": {"keys": ["access", "foot", "motor_vehicle", "bicycle", "horse"], "reference": {"key": "access"}, "type": "access", "label": "Allowed Access", "placeholder": "Not Specified", "strings": {"types": {"access": "All", "foot": "Foot", "motor_vehicle": "Motor Vehicles", "bicycle": "Bicycles", "horse": "Horses"}, "options": {"yes": {"title": "Allowed", "description": "Access allowed by law; a right of way"}, "no": {"title": "Prohibited", "description": "Access not allowed to the general public"}, "permissive": {"title": "Permissive", "description": "Access allowed until such time as the owner revokes the permission"}, "private": {"title": "Private", "description": "Access allowed only with permission of the owner on an individual basis"}, "designated": {"title": "Designated", "description": "Access allowed according to signs or specific local laws"}, "destination": {"title": "Destination", "description": "Access allowed only to reach a destination"}, "dismount": {"title": "Dismount", "description": "Access allowed but rider must dismount"}, "permit": {"title": "Permit", "description": "Access allowed only with a valid permit or license"}}}},
"address": {"type": "address", "keys": ["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"], "reference": {"key": "addr"}, "icon": "address", "universal": true, "label": "Address", "strings": {"placeholders": {"block_number": "Block Number", "block_number!jp": "Block No.", "city": "City", "city!jp": "City/Town/Village/Tokyo Special Ward", "city!vn": "City/Town", "conscriptionnumber": "123", "country": "Country", "county": "County", "county!jp": "District", "district": "District", "district!vn": "Arrondissement/Town/District", "floor": "Floor", "hamlet": "Hamlet", "housename": "Housename", "housenumber": "123", "housenumber!jp": "Building No./Lot No.", "neighbourhood": "Neighbourhood", "neighbourhood!jp": "Chōme/Aza/Koaza", "place": "Place", "postcode": "Postcode", "province": "Province", "province!jp": "Prefecture", "quarter": "Quarter", "quarter!jp": "Ōaza/Machi", "state": "State", "street": "Street", "subdistrict": "Subdistrict", "subdistrict!vn": "Ward/Commune/Townlet", "suburb": "Suburb", "suburb!jp": "Ward", "unit": "Unit"}}},
"admin_level": {"key": "admin_level", "type": "number", "minValue": 1, "label": "Admin Level"},
"aerialway": {"key": "aerialway", "type": "typeCombo", "label": "Type"},
Expand Down
18 changes: 11 additions & 7 deletions data/presets/fields/access.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,35 @@
"options": {
"yes": {
"title": "Allowed",
"description": "Access permitted by law; a right of way"
"description": "Access allowed by law; a right of way"
},
"no": {
"title": "Prohibited",
"description": "Access not permitted to the general public"
"description": "Access not allowed to the general public"
},
"permissive": {
"title": "Permissive",
"description": "Access permitted until such time as the owner revokes the permission"
"description": "Access allowed until such time as the owner revokes the permission"
},
"private": {
"title": "Private",
"description": "Access permitted only with permission of the owner on an individual basis"
"description": "Access allowed only with permission of the owner on an individual basis"
},
"designated": {
"title": "Designated",
"description": "Access permitted according to signs or specific local laws"
"description": "Access allowed according to signs or specific local laws"
},
"destination": {
"title": "Destination",
"description": "Access permitted only to reach a destination"
"description": "Access allowed only to reach a destination"
},
"dismount": {
"title": "Dismount",
"description": "Access permitted but rider must dismount"
"description": "Access allowed but rider must dismount"
},
"permit": {
"title": "Permit",
"description": "Access allowed only with a valid permit or license"
}
}
}
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": ["yes", "permissive", "private", "customers", "no"]
"options": ["yes", "permissive", "private", "customers", "permit", "no"]
}
9 changes: 9 additions & 0 deletions data/taginfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6252,13 +6252,15 @@
{"key": "access", "value": "designated", "description": "Allowed Access"},
{"key": "access", "value": "destination", "description": "Allowed Access"},
{"key": "access", "value": "dismount", "description": "Allowed Access"},
{"key": "access", "value": "permit", "description": "Allowed Access"},
{"key": "foot", "value": "yes", "description": "Allowed Access"},
{"key": "foot", "value": "no", "description": "Allowed Access"},
{"key": "foot", "value": "permissive", "description": "Allowed Access"},
{"key": "foot", "value": "private", "description": "Allowed Access"},
{"key": "foot", "value": "designated", "description": "Allowed Access"},
{"key": "foot", "value": "destination", "description": "Allowed Access"},
{"key": "foot", "value": "dismount", "description": "Allowed Access"},
{"key": "foot", "value": "permit", "description": "Allowed Access"},
{"key": "motor_vehicle", "value": "yes", "description": "Allowed Access"},
{"key": "motor_vehicle", "value": "no", "description": "Allowed Access"},
{
Expand Down Expand Up @@ -6286,20 +6288,27 @@
"value": "dismount",
"description": "Allowed Access"
},
{
"key": "motor_vehicle",
"value": "permit",
"description": "Allowed Access"
},
{"key": "bicycle", "value": "yes", "description": "Allowed Access"},
{"key": "bicycle", "value": "no", "description": "Allowed Access"},
{"key": "bicycle", "value": "permissive", "description": "Allowed Access"},
{"key": "bicycle", "value": "private", "description": "Allowed Access"},
{"key": "bicycle", "value": "designated", "description": "Allowed Access"},
{"key": "bicycle", "value": "destination", "description": "Allowed Access"},
{"key": "bicycle", "value": "dismount", "description": "Allowed Access"},
{"key": "bicycle", "value": "permit", "description": "Allowed Access"},
{"key": "horse", "value": "yes", "description": "Allowed Access"},
{"key": "horse", "value": "no", "description": "Allowed Access"},
{"key": "horse", "value": "permissive", "description": "Allowed Access"},
{"key": "horse", "value": "private", "description": "Allowed Access"},
{"key": "horse", "value": "designated", "description": "Allowed Access"},
{"key": "horse", "value": "destination", "description": "Allowed Access"},
{"key": "horse", "value": "dismount", "description": "Allowed Access"},
{"key": "horse", "value": "permit", "description": "Allowed Access"},
{"key": "addr:block_number", "description": "Address"},
{"key": "addr:city", "description": "Address"},
{"key": "addr:conscriptionnumber", "description": "Address"},
Expand Down
18 changes: 11 additions & 7 deletions dist/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1473,31 +1473,35 @@
"options": {
"yes": {
"title": "Allowed",
"description": "Access permitted by law; a right of way"
"description": "Access allowed by law; a right of way"
},
"no": {
"title": "Prohibited",
"description": "Access not permitted to the general public"
"description": "Access not allowed to the general public"
},
"permissive": {
"title": "Permissive",
"description": "Access permitted until such time as the owner revokes the permission"
"description": "Access allowed until such time as the owner revokes the permission"
},
"private": {
"title": "Private",
"description": "Access permitted only with permission of the owner on an individual basis"
"description": "Access allowed only with permission of the owner on an individual basis"
},
"designated": {
"title": "Designated",
"description": "Access permitted according to signs or specific local laws"
"description": "Access allowed according to signs or specific local laws"
},
"destination": {
"title": "Destination",
"description": "Access permitted only to reach a destination"
"description": "Access allowed only to reach a destination"
},
"dismount": {
"title": "Dismount",
"description": "Access permitted but rider must dismount"
"description": "Access allowed but rider must dismount"
},
"permit": {
"title": "Permit",
"description": "Access allowed only with a valid permit or license"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion modules/ui/fields/access.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function uiFieldAccess(field, context) {


access.options = function(type) {
var options = ['no', 'permissive', 'private', 'destination'];
var options = ['no', 'permissive', 'private', 'permit', 'destination'];

if (type !== 'access') {
options.unshift('yes');
Expand Down

0 comments on commit 121287f

Please sign in to comment.