From 393164ff053567934cb67eebb5fc7c159988eb32 Mon Sep 17 00:00:00 2001 From: paidge <paidge_cs@hotmail.com> Date: Tue, 25 Jan 2022 15:24:11 +0100 Subject: [PATCH] replace input vy select for futures_sorties --- i18n/locales/en.json | 3 ++- i18n/locales/es.json | 3 ++- i18n/locales/fr.json | 3 ++- pages/previsions/futures_sorties.vue | 18 ++++++++---------- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/i18n/locales/en.json b/i18n/locales/en.json index bcce322..5048a86 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -77,6 +77,7 @@ "infos": "Informations", "inout": "Entries and exits of the web of trust for the last 2 days", "inpreparation": "In preparation", + "jours": "0 days | 1 day | {n} days", "lexique": "Lexicon", "limitDate": "Deadline", "membre": { @@ -158,7 +159,7 @@ "parmembre": "Forecasts by members", "period": { "title": "Search period", - "desc": "Select the desired number of days between 1 and 30" + "desc": "Select the desired number of days" }, "title": "Forecasts" }, diff --git a/i18n/locales/es.json b/i18n/locales/es.json index bc35095..30c63ce 100644 --- a/i18n/locales/es.json +++ b/i18n/locales/es.json @@ -77,6 +77,7 @@ "infos": "Informaciones", "inout": "Entradas y salidas de la red de confianza en los últimos 2 dÃas", "inpreparation": "En preparación", + "jours": "0 dÃas | 1 dÃa | {n} dÃas", "lexique": "Léxico", "limitDate": "Fecha lÃmite", "membre": { @@ -158,7 +159,7 @@ "parmembre": "Previsiones por miembros", "period": { "title": "PerÃodo de búsqueda", - "desc": "Seleccione el número de dÃas deseado entre 1 y 30" + "desc": "Seleccione el número de dÃas deseado" }, "title": "Pronósticos" }, diff --git a/i18n/locales/fr.json b/i18n/locales/fr.json index bafd341..131ea07 100644 --- a/i18n/locales/fr.json +++ b/i18n/locales/fr.json @@ -77,6 +77,7 @@ "infos": "Informations", "inout": "Entrées et sorties de la toile de confiance des 2 derniers jours", "inpreparation": "En préparation", + "jours": "0 jours | 1 jour | {n} jours", "lexique": "Lexique", "limitDate": "Date limite", "membre": { @@ -158,7 +159,7 @@ "parmembre": "Prévisions par membres", "period": { "title": "Période de recherche", - "desc": "Sélectionnez le nombre de jours souhaités entre 1 et 30" + "desc": "Sélectionnez le nombre de jours souhaités" }, "title": "Prévisions" }, diff --git a/pages/previsions/futures_sorties.vue b/pages/previsions/futures_sorties.vue index c6a1a3a..fbe4989 100644 --- a/pages/previsions/futures_sorties.vue +++ b/pages/previsions/futures_sorties.vue @@ -6,17 +6,18 @@ <label for="period" class="form-label">{{ $t("previsions.period.title") }}</label> - <input - type="number" + + <select class="form-control" - :class="{ 'is-invalid': periodIsInvalid() }" id="period" aria-describedby="periodHelp" v-model="period" - autocomplete="off" - min="1" - max="30" - @keyup="save" /> + @change="save"> + <option v-for="index in 30" :key="index" :value="index"> + {{ $tc("jours", index) }} + </option> + </select> + <small id="periodHelp" class="form-text text-muted">{{ $t("previsions.period.desc") }}</small> @@ -116,9 +117,6 @@ export default { return this.period * day } return defaultPeriod - }, - periodIsInvalid() { - return this.period != "" && (this.period < 1 || this.period > 30) } }, apollo: { -- GitLab