Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SkuciSe
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tim 2 - 2022
SkuciSe
Commits
c6c53652
Commit
c6c53652
authored
Sep 06, 2022
by
Milovan Samardzic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dodavanjeOglasaFrontIzgled
parent
2f03958a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
32 deletions
+47
-32
SkuciSe/src/main/java/com/example/SkuciSe/repository/OglasRepository.java
+1
-1
SkuciSe/src/main/resources/application.properties
+0
-3
SkuciSe/src/main/resources/static/css/style.css
+4
-0
SkuciSe/src/main/resources/templates/novi-oglas-form.html
+41
-27
SkuciSe/src/main/resources/templates/register.html
+1
-1
No files found.
SkuciSe/src/main/java/com/example/SkuciSe/repository/OglasRepository.java
View file @
c6c53652
...
...
@@ -31,7 +31,7 @@ public class OglasRepository
","
+
newOglas
.
isNamesten
()
+
","
+
newOglas
.
isGrejanje
()
+
","
+
newOglas
.
isLift
()
+
",'"
+
newOglas
.
getLokacija
()
+
"'"
;
",'"
+
newOglas
.
getLokacija
()
+
"'
)
"
;
System
.
out
.
println
(
sql
);
try
{
...
...
SkuciSe/src/main/resources/application.properties
View file @
c6c53652
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
SkuciSe/src/main/resources/static/css/style.css
View file @
c6c53652
...
...
@@ -407,3 +407,6 @@ img {
width
:
50%
;
text-align
:
center
;
}
.form-check-input
{
position
:
relative
;
}
\ No newline at end of file
SkuciSe/src/main/resources/templates/novi-oglas-form.html
View file @
c6c53652
...
...
@@ -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>
...
...
SkuciSe/src/main/resources/templates/register.html
View file @
c6c53652
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment