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
eb725791
Commit
eb725791
authored
Sep 04, 2022
by
Milovan Samardzic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
validationChangePassword
parent
c4f6c25c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
SkuciSe/src/main/resources/static/js/main.js
+19
-0
SkuciSe/src/main/resources/templates/password-edit.html
+11
-7
No files found.
SkuciSe/src/main/resources/static/js/main.js
View file @
eb725791
...
...
@@ -27,3 +27,21 @@ function proveraLogin(){
document
.
getElementById
(
"losaSifra"
).
style
.
display
=
"none"
;
}
}
function
validateForm
()
{
var
prva
=
document
.
getElementById
(
"prvaSifra"
).
value
;
var
druga
=
document
.
getElementById
(
"drugaSifra"
).
value
;
var
errorCode1
=
document
.
getElementById
(
"errorCode1"
);
var
errorCode2
=
document
.
getElementById
(
"errorCode2"
);
if
(
prva
.
trim
().
length
===
0
||
druga
.
trim
().
length
===
0
){
errorCode1
.
style
.
display
=
"block"
;
return
false
;
}
else
if
(
prva
!=
druga
){
errorCode1
.
style
.
display
=
"none"
;
errorCode2
.
style
.
display
=
"block"
;
return
false
;
}
else
return
true
;
}
\ No newline at end of file
SkuciSe/src/main/resources/templates/password-edit.html
View file @
eb725791
...
...
@@ -82,18 +82,22 @@
<div
class=
"form-content"
>
<div
class=
"form-items"
>
<form
class=
"requires-validation"
novalidate
th:object=
"${editUser}"
method=
"POST"
th:action=
"@{/password-edit-save}"
enctype=
"multipart/form-data"
>
th:action=
"@{/password-edit-save}"
enctype=
"multipart/form-data"
onsubmit=
"return validateForm()"
>
<div
class=
"col-md-12"
>
<input
th:field=
"${editUser.sifra}"
class=
"form-control"
type=
"password"
name=
"password"
placeholder=
"Sifra"
required
>
<div
class=
"invalid-feedback"
>
Sifra ne sme biti prazna!
</div>
<span
style=
"color:white;"
>
Unesite novu sifru
</span>
<input
th:field=
"${editUser.sifra}"
type=
"password"
name=
"password"
placeholder=
"Sifra"
required
id=
"prvaSifra"
>
</div>
<div
class=
"col-md-12"
>
<input
class=
"form-control"
type=
"password"
name=
"password"
placeholder=
"Sifra"
required
>
<div
class=
"invalid-feedback"
>
Sifra ne sme biti prazna!
</div>
<span
style=
"color:white;"
>
Ponovite novu sifru
</span>
<input
type=
"password"
name=
"password"
placeholder=
"Sifra"
required
id=
"drugaSifra"
>
<div
id=
"errorCode1"
style=
"display: none;color:red"
>
Popunite oba polja!
</div>
<div
id=
"errorCode2"
style=
"display: none;color:red"
>
Sifre se ne poklapaju!
</div>
</div>
<div
class=
"form-button mt-3"
>
...
...
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