aboutsummaryrefslogtreecommitdiff
path: root/connector/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'connector/src/test/resources')
-rw-r--r--connector/src/test/resources/config/properties/messages.properties1
-rw-r--r--connector/src/test/resources/config/properties/messages_de.properties1
-rw-r--r--connector/src/test/resources/config/templates/residency.html26
3 files changed, 21 insertions, 7 deletions
diff --git a/connector/src/test/resources/config/properties/messages.properties b/connector/src/test/resources/config/properties/messages.properties
index 51befbfc..2f99d892 100644
--- a/connector/src/test/resources/config/properties/messages.properties
+++ b/connector/src/test/resources/config/properties/messages.properties
@@ -118,6 +118,7 @@ gui.residency.found=Found {0} results
gui.residency.unique=Unique result found, please proceed
gui.residency.error=Error on Backend Call
gui.residency.apply=Apply
+gui.residency.input.postleitzahl=Postcode
gui.residency.input.municipality=Municipality
gui.residency.input.village=Village
gui.residency.input.street=Street
diff --git a/connector/src/test/resources/config/properties/messages_de.properties b/connector/src/test/resources/config/properties/messages_de.properties
index c67e445f..ead751d0 100644
--- a/connector/src/test/resources/config/properties/messages_de.properties
+++ b/connector/src/test/resources/config/properties/messages_de.properties
@@ -119,6 +119,7 @@ gui.residency.found={0} Ergebnisse gefunden
gui.residency.unique=Eindeutiges Ergebnis gefunden, bitte fortfahren
gui.residency.error=Fehler bei Addresssuche
gui.residency.apply=Übernehmen
+gui.residency.input.postleitzahl=PLZ
gui.residency.input.municipality=Gemeinde
gui.residency.input.village=Ortschaft
gui.residency.input.street=Straße
diff --git a/connector/src/test/resources/config/templates/residency.html b/connector/src/test/resources/config/templates/residency.html
index 77c13fb7..99de851a 100644
--- a/connector/src/test/resources/config/templates/residency.html
+++ b/connector/src/test/resources/config/templates/residency.html
@@ -33,7 +33,8 @@
let foundText = /*[[#{gui.residency.found}]]*/ 'Found {0}';
let uniqueText = /*[[#{gui.residency.unique}]]*/ 'Unique';
let invalidInputText = /*[[#{gui.residency.header.inputinvalid}]]*/ 'Invalid';
- if (!$("#inputForm #inputMunicipality").val().trim() && !$("#inputForm #inputVillage").val().trim()) {
+ if (!$("#inputForm #inputMunicipality").val().trim() && !$("#inputForm #inputPostleitzahl").val().trim() &&
+ !$("#inputForm #inputVillage").val().trim()) {
$("#textResult").show().text(invalidInputText);
return;
}
@@ -46,6 +47,7 @@
$("#textResult").show().text(uniqueText);
$("#tableResult tbody").empty();
$("#tableResult").hide();
+ $("#inputForm #inputPostleitzahl").val(data["results"][0]["postleitzahl"]);
$("#inputForm #inputMunicipality").val(data["results"][0]["municipality"]);
$("#inputForm #inputVillage").val(data["results"][0]["village"]);
$("#inputForm #inputStreet").val(data["results"][0]["street"]);
@@ -58,20 +60,25 @@
$.each(data.results, function (i, output) {
$("#tableResult tbody")
.append($("<tr>")
+ .append($("<td>").text(output["postleitzahl"] !== null ? output["postleitzahl"] : ""))
.append($("<td>").text(output["municipality"] !== null ? output["municipality"] : ""))
.append($("<td>").text(output["village"] !== null ? output["village"] : ""))
.append($("<td>").text(output["street"] !== null ? output["street"] : ""))
.append($("<td>").text(output["number"] !== null ? output["number"] : ""))
.append($("<td>").text(applyText).attr("href", "#").click(function () {
- $("#inputForm #inputMunicipality").val($(this).parent().children("td:nth-child(1)").text());
- $("#inputForm #inputVillage").val($(this).parent().children("td:nth-child(2)").text());
- $("#inputForm #inputStreet").val($(this).parent().children("td:nth-child(3)").text());
- $("#inputForm #inputNumber").val($(this).parent().children("td:nth-child(4)").text());
+ $("#inputForm #inputPostleitzahl").val($(this).parent().children("td:nth-child(1)").text());
+ $("#inputForm #inputMunicipality").val($(this).parent().children("td:nth-child(2)").text());
+ $("#inputForm #inputVillage").val($(this).parent().children("td:nth-child(3)").text());
+ $("#inputForm #inputStreet").val($(this).parent().children("td:nth-child(4)").text());
+ $("#inputForm #inputNumber").val($(this).parent().children("td:nth-child(5)").text());
$("#textResult").show().text(updatedText);
search();
}))
);
})
+ if (data.results.length == 0) {
+ $("#tableResult").hide();
+ }
}).fail(function (jqXHR, textStatus, errorThrown) {
$("#textResult").show().text(errorText);
})
@@ -107,6 +114,10 @@
th:attr="action=@{${submitEndpoint}}">
<div th:text="#{gui.residency.header.help}">Please enter a Municipality or Village first</div>
<div>
+ <label for="inputPostleitzahl" th:text="#{gui.residency.input.postleitzahl}">Postleitzahl</label>
+ <input type="text" id="inputPostleitzahl" name="postleitzahl" value=""/>
+ </div>
+ <div>
<label for="inputMunicipality" th:text="#{gui.residency.input.municipality}">Municipality</label>
<input type="text" id="inputMunicipality" name="municipality" value=""/>
</div>
@@ -134,8 +145,8 @@
<button type="button" class="block" th:attr="value=#{gui.residency.proceed}">Proceed</button>
</div>
<div>
- <img id="loading" src="$contextPath/static/img/ajax-loader.gif"
- th:attr="src=@{/static/img/ajax-loader.gif}" />
+ <img id="loading" src="$contextPath/static/img/ajax-loader.gif"
+ th:attr="src=@{/static/img/ajax-loader.gif}"/>
</div>
<input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/>
</form>
@@ -148,6 +159,7 @@
<table id="tableResult">
<thead>
<tr>
+ <th th:text="#{gui.residency.input.postleitzahl}">Postleitzahl</th>
<th th:text="#{gui.residency.input.municipality}">Municipality</th>
<th th:text="#{gui.residency.input.village}">Village</th>
<th th:text="#{gui.residency.input.street}">Street</th>