source: Git/target/classes/templates/personsAdd.html@ 5b447b0

main
Last change on this file since 5b447b0 was 5b447b0, checked in by Test <matonikolov77@…>, 3 years ago

Adding models and resources

  • Property mode set to 100644
File size: 4.6 KB
RevLine 
[5b447b0]1<main xmlns:th="http://www.thymeleaf.org">
2
3 <div class="container">
4 <div class="row">
5 <div class="col-md-5">
6 <form th:action="@{'/persons/save/{personId}' (personId = ${person?.getPersonId()})}" method="POST">
7 <div class="form-group">
8
9 <label for="name">Име</label>
10 <input type="text"
11 class="form-control"
12 id="name"
13 name="name"
14 th:value="${person?.getName()}"
15 required
16 placeholder="Име">
17 </div>
18 <div class="form-group">
19 <label for="surname">Презиме</label>
20 <input type="text"
21 class="form-control"
22 id="surname"
23 name="surname"
24 th:value="${person?.getSurname()}"
25 placeholder="Презиме">
26 </div>
27 <div class="form-group">
28 <label for="description">Опис</label>
29 <input type="text"
30 class="form-control"
31 id="description"
32 name="description"
33 th:value="${person?.getDescription()}"
34 placeholder="Опис">
35 </div>
36 <div>
37 <input type="radio"
38 class="form-control person-movies"
39 name="type"
40 th:value="A"
41 th:text="Актер"
42 th:checked="${person?.getType() != null && person.getType().toString().equals('A')}"
43
44 >
45 <input type="radio"
46 class="form-control person-movies"
47 name="type"
48 th:value="D"
49 th:text="Режисер"
50 th:checked="${person?.getType() != null && person.getType().toString().equals('D') }">
51 </div>
52 <div class="form-group">
53 <label for="imageUrl">Слика</label>
54 <input type="text"
55 class="form-control"
56 id="imageUrl"
57 name="imageUrl"
58 th:value="${person?.getImageUrl()}"
59 placeholder="Слика">
60 </div>
61 <div class="form-group">
62 <label for="birthDate">Датум на раѓање</label>
63 <input type="date"
64 class="form-control"
65 id="birthDate"
66 name="birthDate"
67 th:value="${person?.getDateOfBirth()}"
68 placeholder="Датум на раѓање">
69 </div>
70
71
72 <div class="form-group">
73 <select name="movieIds" multiple>
74 <option></option>
75 <option th:each="movie:${moviesActors}" th:value="${movie.getMovieId()}"
76 th:text="${movie.getTitle()}"
77 th:selected="${movieActors?.contains(movie)}"
78 th:hidden="${person != null && person.getType().toString()=='D'}"
79 class="movies-actors"></option>
80
81 <option th:each="movie:${moviesDirectors}" th:value="${movie.getMovieId()}"
82 th:text="${movie.getTitle()}"
83 th:selected="${movieActors?.contains(movie)}"
84 th:hidden="${person != null && person.getType().toString()=='A'}"
85 class="movie-directors"></option>
86
87 </select>
88 </div>
89
90
91 <button id="submit" type="submit" class="btn btn-primary">Submit</button>
92 <a type="button" class="btn btn-primary" th:href="@{/actors}">Back</a>
93 </form>
94 </div>
95 </div>
96 </div>
97
98
99</main>
Note: See TracBrowser for help on using the repository browser.