Now posting the type of real estate
This commit is contained in:
@@ -2,14 +2,26 @@
|
||||
<h2>Koju nekretninu tražite?</h2>
|
||||
</div>
|
||||
|
||||
<form method="POST" id="form-vrsta">
|
||||
<div class="row center-align">
|
||||
<ul class="collection with-header">
|
||||
<% for(let vrsta of vrste) { %>
|
||||
<li class="collection-item"><div><%= vrsta.ime %><a href="#!" class="secondary-content"><i class="material-icons">send</i></a></div></li>
|
||||
<li class="collection-item" > <div id="<%= vrsta.id %>" ><%= vrsta.ime %><a href="#!" class="secondary-content"><i class="material-icons">send</i></a></div></li>
|
||||
<% } %>
|
||||
</ul>
|
||||
<input type="hidden" name="vrsta" id="vrsta" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(document).ready( () => {
|
||||
$(".collection-item").click( (e) => {
|
||||
const clickedId = $(e.target).attr("id");
|
||||
$("#vrsta").val(clickedId);
|
||||
$("#form-vrsta").submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user