send codeRivoli to back
This commit is contained in:
parent
bd24f9044c
commit
8c7ff6a11b
2 changed files with 6 additions and 3 deletions
|
@ -111,6 +111,7 @@
|
||||||
// Global variables
|
// Global variables
|
||||||
var communes = []
|
var communes = []
|
||||||
var codeInsee = 0
|
var codeInsee = 0
|
||||||
|
var codeRivoli = ""
|
||||||
var voies = []
|
var voies = []
|
||||||
var voie = ""
|
var voie = ""
|
||||||
|
|
||||||
|
@ -183,7 +184,7 @@
|
||||||
for (i in voies) {
|
for (i in voies) {
|
||||||
voie = voies[i]
|
voie = voies[i]
|
||||||
$("#voies").append("<option value='" +
|
$("#voies").append("<option value='" +
|
||||||
voie[1] + "'>" + voie[0] + "</option>");
|
voie[0] + "'></option>");
|
||||||
if (voie[0] === search) {
|
if (voie[0] === search) {
|
||||||
valueMatch=true;
|
valueMatch=true;
|
||||||
}
|
}
|
||||||
|
@ -191,6 +192,7 @@
|
||||||
if (voies.length == 1 || valueMatch) {
|
if (voies.length == 1 || valueMatch) {
|
||||||
$('#btnTestAdresse').collapse('show');
|
$('#btnTestAdresse').collapse('show');
|
||||||
voie = voies[0]
|
voie = voies[0]
|
||||||
|
codeRivoli = voie[1]
|
||||||
$("#voieInput").val(voie[0]);
|
$("#voieInput").val(voie[0]);
|
||||||
$('#btnTestAdresse').focus();
|
$('#btnTestAdresse').focus();
|
||||||
} else {
|
} else {
|
||||||
|
@ -257,6 +259,7 @@
|
||||||
|
|
||||||
$('#formAddressTest').submit(function(eventObj) {
|
$('#formAddressTest').submit(function(eventObj) {
|
||||||
$('#formAddressTest').append(`<input type="hidden" class="form-control" name="codeInsee" value="${codeInsee}" />`);
|
$('#formAddressTest').append(`<input type="hidden" class="form-control" name="codeInsee" value="${codeInsee}" />`);
|
||||||
|
$('#formAddressTest').append(`<input type="hidden" class="form-control" name="codeRivoli" value="${codeRivoli}" />`);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -57,8 +57,8 @@ def test_address():
|
||||||
codeInsee = escape(request.form['codeInsee'])
|
codeInsee = escape(request.form['codeInsee'])
|
||||||
numeroVoie = escape(request.form['numeroVoie'])
|
numeroVoie = escape(request.form['numeroVoie'])
|
||||||
# Trimming rivoli's key
|
# Trimming rivoli's key
|
||||||
voie = escape(request.form['voie'])[:-1]
|
codeRivoli = escape(request.form['codeRivoli'])[:-1]
|
||||||
result = query_axione_fantoir(cfg, codeInsee, voie, numeroVoie)
|
result = query_axione_fantoir(cfg, codeInsee, codeRivoli, numeroVoie)
|
||||||
return render_template("result.html", pto="", result=result)
|
return render_template("result.html", pto="", result=result)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue