diff options
author | Thomas <> | 2022-07-01 15:59:01 +0200 |
---|---|---|
committer | Thomas <> | 2022-07-01 15:59:01 +0200 |
commit | f2a32b225c243e2cf8b5b368cc6ac4611ce3a476 (patch) | |
tree | 5704559b53c4117bb4db9d43d66a37b301bd8c47 | |
parent | 62bea15ec763f09f2a8df1ba4266804b4e8641c3 (diff) | |
download | National_eIDAS_Gateway-f2a32b225c243e2cf8b5b368cc6ac4611ce3a476.tar.gz National_eIDAS_Gateway-f2a32b225c243e2cf8b5b368cc6ac4611ce3a476.tar.bz2 National_eIDAS_Gateway-f2a32b225c243e2cf8b5b368cc6ac4611ce3a476.zip |
feat(matching): distiguish between empty and non empty address-search results
-rw-r--r-- | basicConfig/templates/residency.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/basicConfig/templates/residency.html b/basicConfig/templates/residency.html index 26812ec0..de77269f 100644 --- a/basicConfig/templates/residency.html +++ b/basicConfig/templates/residency.html @@ -33,6 +33,7 @@ function search() { let updatedText = /*[[#{gui.residency.updated}]]*/ 'Updated text'; let errorText = /*[[#{gui.residency.error}]]*/ 'Error'; + let emptyText = /*[[#{gui.residency.noentry}]]*/ 'Found {0}' let foundText = /*[[#{gui.residency.found}]]*/ 'Found {0}'; let uniqueText = /*[[#{gui.residency.unique}]]*/ 'Unique'; let invalidInputText = /*[[#{gui.residency.header.inputinvalid}]]*/ 'Invalid'; @@ -57,7 +58,12 @@ $("#inputForm #inputNumber").val(data["results"][0]["number"]); return; } - $("#textResult").show().text(foundText.replace("{0}", data["resultCount"])); + + if (data["resultCount"] === 0) { + $("#textResult").show().text(emptyText); + } else { + $("#textResult").show().text(foundText.replace("{0}", data["resultCount"])); + } $("#tableResult").show(); $("#tableResult tbody").empty(); $.each(data.results, function (i, output) { |