Now posting the type of real estate

This commit is contained in:
Senad Uka
2019-04-15 06:56:03 +02:00
parent 0f7e9f9285
commit 2380c85122
2 changed files with 14 additions and 3 deletions

View File

@@ -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>

View File

@@ -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>