From c886490f79a5d4038dc9e499b54d7ea4a3087564 Mon Sep 17 00:00:00 2001 From: Simon Bilsky-Rollins Date: Mon, 8 Oct 2018 22:09:34 -0400 Subject: [PATCH] add minValue and placeholder for seats field --- data/presets.yaml | 2 ++ data/presets/fields.json | 2 +- data/presets/fields/seats.json | 4 +++- dist/locales/en.json | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/data/presets.yaml b/data/presets.yaml index 1bbe52bd8..3b55cbb35 100644 --- a/data/presets.yaml +++ b/data/presets.yaml @@ -1588,6 +1588,8 @@ en: seats: # seats=* label: Seats + # seats field placeholder + placeholder: '2, 4, 6...' second_hand: # second_hand=* label: Sells Used diff --git a/data/presets/fields.json b/data/presets/fields.json index ef5e3a31e..19c54a78d 100644 --- a/data/presets/fields.json +++ b/data/presets/fields.json @@ -263,7 +263,7 @@ "seamark/type": {"key": "seamark:type", "type": "combo", "universal": true, "label": "Seamark"}, "seamark/wreck/category": {"key": "seamark:wreck:category", "type": "combo", "label": "Category"}, "seasonal": {"key": "seasonal", "type": "check", "label": "Seasonal"}, - "seats": {"key": "seats", "type": "number", "label": "Seats"}, + "seats": {"key": "seats", "type": "number", "minValue": 0, "label": "Seats", "placeholder": "2, 4, 6..."}, "second_hand": {"key": "second_hand", "type": "combo", "label": "Sells Used", "placeholder": "Yes, No, Only", "strings": {"options": {"yes": "Yes", "no": "No", "only": "Only"}}}, "service_rail": {"key": "service", "type": "combo", "label": "Service Type", "strings": {"options": {"spur": "Spur", "yard": "Yard", "siding": "Siding", "crossover": "Crossover"}}}, "service_times": {"key": "service_times", "type": "text", "label": "Service Times"}, diff --git a/data/presets/fields/seats.json b/data/presets/fields/seats.json index d3f5818f2..e9655f895 100644 --- a/data/presets/fields/seats.json +++ b/data/presets/fields/seats.json @@ -1,5 +1,7 @@ { "key": "seats", "type": "number", - "label": "Seats" + "minValue": 0, + "label": "Seats", + "placeholder": "2, 4, 6..." } diff --git a/dist/locales/en.json b/dist/locales/en.json index ec87ef3ae..6e8391569 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -2770,7 +2770,8 @@ "label": "Seasonal" }, "seats": { - "label": "Seats" + "label": "Seats", + "placeholder": "2, 4, 6..." }, "second_hand": { "label": "Sells Used",