Files
old-web/app/views/realEstateType.ejs
2019-10-15 18:34:34 +02:00

30 lines
579 B
Plaintext

<form method="POST" id="form-real-estate-type">
<div class="row center-align">
<div class="collection">
<% for(const realEstateType of realEstateTypes) { %>
<a href="#" class="collection-item"
id="<%= realEstateType.id %>"
onclick="saveAndSubmit(this.id)"
>
<%= realEstateType.title %>
</a>
<% } %>
</div>
<input type="hidden" name="realEstateType" id="realEstateType" />
</div>
</form>
<script>
function saveAndSubmit(id) {
$("#realEstateType").val(id);
$("#form-real-estate-type").submit();
}
</script>