Commit c6c53652 by Milovan Samardzic

dodavanjeOglasaFrontIzgled

parent 2f03958a
......@@ -31,7 +31,7 @@ public class OglasRepository
"," + newOglas.isNamesten() +
"," + newOglas.isGrejanje() +
"," + newOglas.isLift() +
",'" + newOglas.getLokacija() + "'";
",'" + newOglas.getLokacija() + "')";
System.out.println( sql);
try {
......
spring.servlet.multipart.max-file-size=16MB
spring.servlet.multipart.max-request-size=16MB
\ No newline at end of file
spring.servlet.multipart.max-file-size=16MB
spring.servlet.multipart.max-request-size=16MB
\ No newline at end of file
......@@ -407,3 +407,6 @@ img {
width: 50%;
text-align: center;
}
.form-check-input{
position:relative;
}
\ No newline at end of file
......@@ -42,7 +42,8 @@
</li>
</ul>
<form class="form-inline my-2 my-lg-0" th:if="${loggedUser != null}">
<a th:href="@{/novi-oglas}"><button type="button" class="btn btn-primary btn-md mr-2"><i class="fa-solid fa-plus"></i> Postavite
<a th:href="@{/novi-oglas}">
<button type="button" class="btn btn-primary btn-md mr-2"><i class="fa-solid fa-plus"></i> Postavite
novi oglas
</button>
</a>
......@@ -81,16 +82,17 @@
</nav>
<div class="form-body d-flex justify-content-center w-100 mt-5">
<div class="form-body d-flex justify-content-center w-100 mt-5" style="height: 600px;">
<div class="row">
<div class="form-holder">
<div class="form-content" style="bottom:50px;">
<div class="form-content">
<div class="form-items">
<h3>Novi oglas</h3>
<p>Popunite podatke ispod.</p>
<form class="requires-validation" novalidate th:object="${newOglas}" method="POST"
<form class="requires-validation d-flex flex-wrap justify-content-center align-items-center"
novalidate th:object="${newOglas}" method="POST"
th:action="@{/novi-oglas/save}" enctype="multipart/form-data">
<div>
<div class="col-md-12">
<input th:field="${newOglas.naslov}" class="form-control" type="text"
placeholder="Ime" required>
......@@ -137,52 +139,63 @@
placeholder="Broj soba" required>
<div class="invalid-feedback">Broj soba ne sme biti prazan!</div>
</div>
<div class="col-md-12">
<input th:field="${newOglas.lift}" class="form-check-input" type="checkbox" value="">
<label class="form-check-label">
</div>
<div class="d-flex justify-content-center align-items-center flex-column mt-4">
<div class="d-flex flex-row justify-content-center align-items-center w-100">
<div class="col d-flex flex-row justify-content-center">
<input th:field="${newOglas.lift}" class="form-check-input" type="checkbox"
value="">
<label class="ml-2">
Lift
</label>
</div>
<div class="col-md-12">
<input th:field="${newOglas.namesten}" class="form-check-input" type="checkbox" value="">
<label class="form-check-label">
<div class="col col d-flex flex-row justify-content-center">
<input th:field="${newOglas.namesten}" class="form-check-input" type="checkbox"
value="">
<label class="ml-2">
Namesten
</label>
</div>
<div class="col-md-12">
<input th:field="${newOglas.grejanje}" class="form-check-input" type="checkbox" value="">
<label class="form-check-label">
<div class="col col d-flex flex-row justify-content-center">
<input th:field="${newOglas.grejanje}" class="form-check-input" type="checkbox"
value="">
<label class="ml-2">
Grejanje
</label>
</div>
<div class="col-md-12">
<input class="form-check-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1" value="1" checked>
</div>
<div class="col-md-12 d-flex justify-content-between align-items-center flex-row">
<div style="margin-left: 1.4rem">
<input class="form-check-input" type="radio" name="flexRadioDefault"
id="flexRadioDefault1" value="1" checked th:field="${newOglas.vrstaOglasaId}">
<label class="form-check-label" for="flexRadioDefault1">
Prodaja
</label>
<input class="form-check-input" type="radio" name="flexRadioDefault" id="flexRadioDefault2" value="2">
</div>
<div>
<input class="form-check-input" type="radio" name="flexRadioDefault"
id="flexRadioDefault2" value="2" th:field="${newOglas.vrstaOglasaId}">
<label class="form-check-label" for="flexRadioDefault2">
Izdavanje
</label>
</div>
<div class="col-md-12">
<textarea th:field="${newOglas.opis}" class="form-control"
placeholder="Opis" required></textarea>
<div class="invalid-feedback">Opis ne sme biti prazan!</div>
</div>
<div class="col-md-12 mt-2" style="color:white;">
<input type="file" name="images" accept="image/png, image/jpeg"/>
<input class="form-control" name="images" type="file" id="formFileMultiple" accept="image/png, image/jpeg" multiple />
<label for="formFileMultiple" class="form-label">Slike stana</label>
<div class="invalid-feedback">Unesite sliku!</div>
</div>
<div class="form-check">
<div class="col-md-12">
<textarea th:field="${newOglas.opis}" class="form-control" placeholder="Opis"
required></textarea>
<div class="invalid-feedback">Opis ne sme biti prazan!</div>
</div>
<div class="form-check ml-3">
<input class="form-check-input" type="checkbox" value="" id="invalidCheck" required>
<label class="form-check-label">Potvrdjujem da su svi podaci tacni</label>
<div class="invalid-feedback">Molim vas da potvrdite da su svi podaci tacni!</div>
......@@ -192,6 +205,7 @@
<div class="form-button mt-3">
<button id="submit" type="submit" class="btn btn-primary">Registruj se</button>
</div>
</div>
</form>
</div>
</div>
......
......@@ -134,7 +134,7 @@
</div>
<div class="col-md-12 mt-2" style="color:white;">
<input type="file" name="image" accept="image/png, image/jpeg"/>
<input class="form-control" name="image" type="file" id="formFileMultiple" accept="image/png, image/jpeg" multiple />
<div class="invalid-feedback">Unesite sliku!</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment