Commit 8bb28e9c by Milovan Samardzic

IzmenaProfilaUpdate

parent 8e8325f5
...@@ -66,6 +66,7 @@ public class AppController ...@@ -66,6 +66,7 @@ public class AppController
model.addAttribute("editUser", loggedUser.getKorisnik()); model.addAttribute("editUser", loggedUser.getKorisnik());
model.addAttribute("profileRole", kRepo.findRoleById( loggedUser.getKorisnik().getTipId())); model.addAttribute("profileRole", kRepo.findRoleById( loggedUser.getKorisnik().getTipId()));
model.addAttribute("grad", lRepo.findById( loggedUser.getKorisnik().getGradId())); model.addAttribute("grad", lRepo.findById( loggedUser.getKorisnik().getGradId()));
model.addAttribute("lokacije", lRepo.findAll());
return("profile"); return("profile");
} }
......
...@@ -279,6 +279,7 @@ h3{ ...@@ -279,6 +279,7 @@ h3{
.container { .container {
max-width: 1000px; max-width: 1000px;
padding: 0; padding: 0;
height: 600px;
} }
p { p {
...@@ -359,3 +360,22 @@ img { ...@@ -359,3 +360,22 @@ img {
width: 50%; width: 50%;
text-align: center; text-align: center;
} }
/*the fade animations*/
@keyframes fade-out {
from {
opacity: 100%;
}
to {
opacity: 0%;
}
}
@keyframes fade-in {
from {
opacity: 0%;
}
to {
opacity: 100%;
}
}
\ No newline at end of file
...@@ -27,3 +27,27 @@ function proveraLogin(){ ...@@ -27,3 +27,27 @@ function proveraLogin(){
document.getElementById("losaSifra").style.display = "none"; document.getElementById("losaSifra").style.display = "none";
} }
} }
//toggle var
var fade_state = true;
//on btn click
function fade() {
//get the button and div
let div = document.getElementById("fadeDiv");
let btn = document.getElementById("fade");
//if faded in or out
if (fade_state == true) {
//trigers animation
div.style.animation = "fade-out 2s forwards";
//sets the text
btn.innerHTML = "fade-in";
//sets fade_state
fade_state = false;
} else if (fade_state == false) {
//trigers animation
div.style.animation = "fade-in 2s forwards";
//sets the text
btn.innerHTML = "fade-out";
//sets fade_state
fade_state = true;
}
}
\ No newline at end of file
...@@ -71,10 +71,14 @@ ...@@ -71,10 +71,14 @@
<div class="invalid-feedback">Email ne sme biti prazan!</div> <div class="invalid-feedback">Email ne sme biti prazan!</div>
</div> </div>
div class="col-md-12">
<select th:field="${newUser.gradId}"> <select th:field="${newUser.gradId}">
<option th:each="lokacija: ${lokacije}" th:value="${lokacija.getLokacijaId()}" th:text="${lokacija.getNaziv()}"> <option th:each="lokacija: ${lokacije}" th:value="${lokacija.getLokacijaId()}" th:text="${lokacija.getNaziv()}">
</option> </option>
</select> </select>
<div class="valid-feedback">Dobar grad!</div>
</div>
<div class="col-md-12"> <div class="col-md-12">
<input th:field="${newUser.sifra}" class="form-control" type="password" name="password" placeholder="Sifra" required> <input th:field="${newUser.sifra}" class="form-control" type="password" name="password" placeholder="Sifra" required>
......
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