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="@{'/movies/save/{movieId}' (movieId = ${movie?.getMovieId()})}" method="POST">
|
---|
7 | <div class="form-group">
|
---|
8 | <label for="title">Наслов</label>
|
---|
9 | <input type="text"
|
---|
10 | class="form-control"
|
---|
11 | id="title"
|
---|
12 | name="title"
|
---|
13 | th:value="${movie?.getTitle()}"
|
---|
14 | required
|
---|
15 | placeholder="Наслов">
|
---|
16 | </div>
|
---|
17 | <div class="form-group">
|
---|
18 | <label for="description">Опис</label>
|
---|
19 | <input type="text"
|
---|
20 | multiple
|
---|
21 | class="form-control"
|
---|
22 | id="description"
|
---|
23 | name="description"
|
---|
24 | th:value="${movie?.getDescription()}"
|
---|
25 | placeholder="Опис">
|
---|
26 | </div>
|
---|
27 | <div class="form-group">
|
---|
28 | <label for="imageUrl">Слика</label>
|
---|
29 | <input type="text"
|
---|
30 | class="form-control"
|
---|
31 | id="imageUrl"
|
---|
32 | name="imageUrl"
|
---|
33 | th:value="${movie?.getImageUrl()}"
|
---|
34 | placeholder="Слика">
|
---|
35 | </div>
|
---|
36 | <div class="form-group">
|
---|
37 | <label for="airingDate">Датум на издавање</label>
|
---|
38 | <input type="date"
|
---|
39 | class="form-control"
|
---|
40 | id="airingDate"
|
---|
41 | name="airingDate"
|
---|
42 | th:value="${movie?.getAiringDate()}"
|
---|
43 | placeholder="Датум на издавање">
|
---|
44 | </div>
|
---|
45 | <div class="form-group">
|
---|
46 | <label for="rating">Рејтинг</label>
|
---|
47 | <input type="number"
|
---|
48 | step="0.01"
|
---|
49 | class="form-control"
|
---|
50 | id="rating"
|
---|
51 | name="rating"
|
---|
52 | th:value="${movie?.getImdbRating()}"
|
---|
53 | placeholder="Рејтинг">
|
---|
54 | </div>
|
---|
55 | <div class="form-group">
|
---|
56 | <select name="directorId">
|
---|
57 | <option></option>
|
---|
58 | <option th:each="dir:${directors}" th:value="${dir.getPersonId()}" th:text="${dir.getName() + ' ' + dir.getSurname()}"
|
---|
59 | th:selected="${director?.equals(dir)}"></option>
|
---|
60 |
|
---|
61 | </select>
|
---|
62 | </div>
|
---|
63 | <div class="form-group">
|
---|
64 | <select name="actors" multiple>
|
---|
65 | <option></option>
|
---|
66 | <option th:each="act:${actors}" th:value="${act.getPersonId()}"
|
---|
67 | th:text="${act.getName() + ' ' + act.getSurname()}"
|
---|
68 | th:selected="${movieActors?.contains(act)}"></option>
|
---|
69 |
|
---|
70 | </select>
|
---|
71 | </div>
|
---|
72 | <div class="form-group">
|
---|
73 | <select name="genres" multiple>
|
---|
74 | <option></option>
|
---|
75 | <option th:each="genr:${genres}" th:value="${genr.getGenreId()}"
|
---|
76 | th:text="${genr.getGenreType()}"
|
---|
77 | th:selected="${movieGenres?.contains(genr)}"></option>
|
---|
78 |
|
---|
79 | </select>
|
---|
80 | </div>
|
---|
81 |
|
---|
82 | <button id="submit" type="submit" class="btn btn-primary">Submit</button>
|
---|
83 | <a type="button" class="btn btn-primary" href="/products">Back</a>
|
---|
84 | </form>
|
---|
85 | </div>
|
---|
86 | </div>
|
---|
87 | </div>
|
---|
88 |
|
---|
89 |
|
---|
90 | </main> |
---|