From 121287fe9768a94038a0e269a8f10cd2a99786bc Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 13 Aug 2018 15:03:57 -0400 Subject: [PATCH] Support `access=permit` in access and access_simple fields (closes #5223) --- data/presets.yaml | 19 ++++++++++++------- data/presets/fields.json | 4 ++-- data/presets/fields/access.json | 18 +++++++++++------- data/presets/fields/access_simple.json | 2 +- data/taginfo.json | 9 +++++++++ dist/locales/en.json | 18 +++++++++++------- modules/ui/fields/access.js | 2 +- 7 files changed, 47 insertions(+), 25 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index f736c3a32..14fe61c70 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -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 diff --git a/data/presets/fields.json b/data/presets/fields.json index ebfc9ddb1..8698d74ff 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -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"}, diff --git a/data/presets/fields/access.json b/data/presets/fields/access.json index 8615abfa7..776d58ca3 100644 --- a/data/presets/fields/access.json +++ b/data/presets/fields/access.json @@ -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" } } } diff --git a/data/presets/fields/access_simple.json b/data/presets/fields/access_simple.json index fa6bcbf83..d3ef2cfb8 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": ["yes", "permissive", "private", "customers", "no"] + "options": ["yes", "permissive", "private", "customers", "permit", "no"] } diff --git a/data/taginfo.json b/data/taginfo.json index d34753815..fbdd0389b 100644 --- a/data/taginfo.json +++ b/data/taginfo.json @@ -6252,6 +6252,7 @@ {"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"}, @@ -6259,6 +6260,7 @@ {"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"}, { @@ -6286,6 +6288,11 @@ "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"}, @@ -6293,6 +6300,7 @@ {"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"}, @@ -6300,6 +6308,7 @@ {"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"}, diff --git a/dist/locales/en.json b/dist/locales/en.json index 630d9fe07..ca551b5a0 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -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" } } }, diff --git a/modules/ui/fields/access.js b/modules/ui/fields/access.js index 11fa0c29d..4df935d45 100644 --- a/modules/ui/fields/access.js +++ b/modules/ui/fields/access.js @@ -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');