Now posting the type of real estate
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="stylesheet" href="/assets/main.css">
|
<link rel="stylesheet" href="/assets/main.css">
|
||||||
</head>
|
</head>
|
||||||
@@ -12,7 +12,6 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<%-body%>
|
<%-body%>
|
||||||
</div>
|
</div>
|
||||||
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -2,14 +2,26 @@
|
|||||||
<h2>Koju nekretninu tražite?</h2>
|
<h2>Koju nekretninu tražite?</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<form method="POST" id="form-vrsta">
|
||||||
<div class="row center-align">
|
<div class="row center-align">
|
||||||
<ul class="collection with-header">
|
<ul class="collection with-header">
|
||||||
<% for(let vrsta of vrste) { %>
|
<% 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>
|
</ul>
|
||||||
|
<input type="hidden" name="vrsta" id="vrsta" />
|
||||||
</div>
|
</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