From e9dfa04dd49e339124e0972ea3287191a07ce856 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 30 Dec 2016 23:32:00 -0500 Subject: [PATCH] Social Facility preset improvements (closes #3702) * Add `social facility` field * Make sure Social Facility presets have both `social_facility` and `social_facility:for` * Change `social_facility:for` from radio to combo, because so many choices --- data/presets.yaml | 7 ++--- data/presets/fields.json | 26 +++++-------------- data/presets/fields/social_facility.json | 5 ++++ data/presets/fields/social_facility_for.json | 24 +++-------------- data/presets/presets.json | 18 ++++++++----- data/presets/presets/amenity/crematorium.json | 5 ++-- .../presets/amenity/social_facility.json | 8 +++--- .../amenity/social_facility/food_bank.json | 5 ++-- .../amenity/social_facility/group_home.json | 5 ++-- .../social_facility/homeless_shelter.json | 3 ++- dist/locales/en.json | 6 +++-- 11 files changed, 48 insertions(+), 64 deletions(-) create mode 100644 data/presets/fields/social_facility.json diff --git a/data/presets.yaml b/data/presets.yaml index 24c3d5cce9..e13de04309 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1062,11 +1062,12 @@ en: very_horrible: 'Specialized off-road: tractor, ATV' # smoothness field placeholder placeholder: 'Thin Rollers, Wheels, Off-Road...' + social_facility: + # social_facility=* + label: Type social_facility_for: # 'social_facility:for=*' - label: People served - # social_facility_for field placeholder - placeholder: 'Homeless, Disabled, Child, etc' + label: People Served source: # source=* label: Source diff --git a/data/presets/fields.json b/data/presets/fields.json index 30e94f64c5..5c9b606b82 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -1409,25 +1409,13 @@ }, "social_facility_for": { "key": "social_facility:for", - "type": "radio", - "label": "People served", - "placeholder": "Homeless, Disabled, Child, etc", - "options": [ - "abused", - "child", - "disabled", - "diseased", - "drug_addicted", - "homeless", - "juvenile", - "mental_health", - "migrant", - "orphan", - "senior", - "underprivileged", - "unemployed", - "victim" - ] + "type": "combo", + "label": "People Served" + }, + "social_facility": { + "key": "social_facility", + "type": "combo", + "label": "Type" }, "source": { "key": "source", diff --git a/data/presets/fields/social_facility.json b/data/presets/fields/social_facility.json new file mode 100644 index 0000000000..901e38fa86 --- /dev/null +++ b/data/presets/fields/social_facility.json @@ -0,0 +1,5 @@ +{ + "key": "social_facility", + "type": "combo", + "label": "Type" +} diff --git a/data/presets/fields/social_facility_for.json b/data/presets/fields/social_facility_for.json index cf4a6212fe..960201be5a 100644 --- a/data/presets/fields/social_facility_for.json +++ b/data/presets/fields/social_facility_for.json @@ -1,23 +1,5 @@ { "key": "social_facility:for", - "type": "radio", - "label": "People served", - "placeholder": "Homeless, Disabled, Child, etc", - "options": [ - "abused", - "child", - "disabled", - "diseased", - "drug_addicted", - "homeless", - "juvenile", - "mental_health", - "migrant", - "orphan", - "senior", - "underprivileged", - "unemployed", - "victim" - ] - -} \ No newline at end of file + "type": "combo", + "label": "People Served" +} diff --git a/data/presets/presets.json b/data/presets/presets.json index a6b4f992c5..12d0d63882 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -2109,9 +2109,10 @@ "operator", "address", "building_area", + "social_facility", + "social_facility_for", "opening_hours", - "wheelchair", - "social_facility_for" + "wheelchair" ], "geometry": [ "point", @@ -2128,8 +2129,9 @@ "operator", "address", "building_area", - "opening_hours", - "social_facility_for" + "social_facility", + "social_facility_for", + "opening_hours" ], "geometry": [ "point", @@ -2147,9 +2149,10 @@ "operator", "address", "building_area", + "social_facility", + "social_facility_for", "opening_hours", - "wheelchair", - "social_facility_for" + "wheelchair" ], "geometry": [ "point", @@ -2172,9 +2175,10 @@ "operator", "address", "building_area", + "social_facility", + "social_facility_for", "opening_hours", "wheelchair", - "social_facility_for", "internet_access", "internet_access/fee", "internet_access/ssid" diff --git a/data/presets/presets/amenity/crematorium.json b/data/presets/presets/amenity/crematorium.json index acfca6ada7..cde1bbe3f2 100644 --- a/data/presets/presets/amenity/crematorium.json +++ b/data/presets/presets/amenity/crematorium.json @@ -5,10 +5,9 @@ "phone", "opening_hours", "wheelchair" - ], "geometry": [ - "area", + "area", "point" ], "tags": { @@ -16,4 +15,4 @@ }, "terms": ["cemetery","funeral"], "name": "Crematorium" -} \ No newline at end of file +} diff --git a/data/presets/presets/amenity/social_facility.json b/data/presets/presets/amenity/social_facility.json index 926a814b8c..58dfa0402f 100644 --- a/data/presets/presets/amenity/social_facility.json +++ b/data/presets/presets/amenity/social_facility.json @@ -3,16 +3,16 @@ "operator", "address", "building_area", + "social_facility", + "social_facility_for", "opening_hours", - "wheelchair", - "social_facility_for" + "wheelchair" ], "geometry": [ "point", "area" ], - "terms": [ - ], + "terms": [], "tags": { "amenity": "social_facility" }, diff --git a/data/presets/presets/amenity/social_facility/food_bank.json b/data/presets/presets/amenity/social_facility/food_bank.json index 46053afac6..680a7619d2 100644 --- a/data/presets/presets/amenity/social_facility/food_bank.json +++ b/data/presets/presets/amenity/social_facility/food_bank.json @@ -3,8 +3,9 @@ "operator", "address", "building_area", - "opening_hours", - "social_facility_for" + "social_facility", + "social_facility_for", + "opening_hours" ], "geometry": [ "point", diff --git a/data/presets/presets/amenity/social_facility/group_home.json b/data/presets/presets/amenity/social_facility/group_home.json index ccf07da2a1..620540fac6 100644 --- a/data/presets/presets/amenity/social_facility/group_home.json +++ b/data/presets/presets/amenity/social_facility/group_home.json @@ -3,9 +3,10 @@ "operator", "address", "building_area", + "social_facility", + "social_facility_for", "opening_hours", - "wheelchair", - "social_facility_for" + "wheelchair" ], "geometry": [ "point", diff --git a/data/presets/presets/amenity/social_facility/homeless_shelter.json b/data/presets/presets/amenity/social_facility/homeless_shelter.json index 717ddece7d..96b6128af8 100644 --- a/data/presets/presets/amenity/social_facility/homeless_shelter.json +++ b/data/presets/presets/amenity/social_facility/homeless_shelter.json @@ -3,9 +3,10 @@ "operator", "address", "building_area", + "social_facility", + "social_facility_for", "opening_hours", "wheelchair", - "social_facility_for", "internet_access", "internet_access/fee", "internet_access/ssid" diff --git a/dist/locales/en.json b/dist/locales/en.json index 657f86b891..cb3dabc40d 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1607,8 +1607,10 @@ } }, "social_facility_for": { - "label": "People served", - "placeholder": "Homeless, Disabled, Child, etc" + "label": "People Served" + }, + "social_facility": { + "label": "Type" }, "source": { "label": "Source"