From 8c7ff6a11b1f91ec1919ab1917ae8205f2c3c8a3 Mon Sep 17 00:00:00 2001 From: Johan Le Baut Date: Sun, 13 Feb 2022 00:26:31 +0100 Subject: [PATCH] send codeRivoli to back --- templates/landing_form.html | 5 ++++- webapp.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/templates/landing_form.html b/templates/landing_form.html index 3a9ed69..b8df301 100644 --- a/templates/landing_form.html +++ b/templates/landing_form.html @@ -111,6 +111,7 @@ // Global variables var communes = [] var codeInsee = 0 + var codeRivoli = "" var voies = [] var voie = "" @@ -183,7 +184,7 @@ for (i in voies) { voie = voies[i] $("#voies").append(""); + voie[0] + "'>"); if (voie[0] === search) { valueMatch=true; } @@ -191,6 +192,7 @@ if (voies.length == 1 || valueMatch) { $('#btnTestAdresse').collapse('show'); voie = voies[0] + codeRivoli = voie[1] $("#voieInput").val(voie[0]); $('#btnTestAdresse').focus(); } else { @@ -257,6 +259,7 @@ $('#formAddressTest').submit(function(eventObj) { $('#formAddressTest').append(``); + $('#formAddressTest').append(``); return true; }); }); diff --git a/webapp.py b/webapp.py index 040ec9e..8641b9a 100644 --- a/webapp.py +++ b/webapp.py @@ -57,8 +57,8 @@ def test_address(): codeInsee = escape(request.form['codeInsee']) numeroVoie = escape(request.form['numeroVoie']) # Trimming rivoli's key - voie = escape(request.form['voie'])[:-1] - result = query_axione_fantoir(cfg, codeInsee, voie, numeroVoie) + codeRivoli = escape(request.form['codeRivoli'])[:-1] + result = query_axione_fantoir(cfg, codeInsee, codeRivoli, numeroVoie) return render_template("result.html", pto="", result=result)