1 | <th:block xmlns:th="http://www.thymeleaf.org">
|
---|
2 | <section class="jumbotron text-center">
|
---|
3 | <div class="container">
|
---|
4 | <h1 class="jumbotron-heading">ADD NEW PROJECTION</h1>
|
---|
5 | </div>
|
---|
6 | </section>
|
---|
7 |
|
---|
8 | <div class="container">
|
---|
9 | <div class="row">
|
---|
10 | <div class="col-md-5">
|
---|
11 | <form action="/projections/add" th:method="POST" style="color:white">
|
---|
12 | <input id="id" type="hidden" name="id" th:value="(${movieProjection} != null ? ${movieProjection.getProjection_Id()} : '')">
|
---|
13 | <div class="form-group">
|
---|
14 | <label for="projection_id">ID</label>
|
---|
15 | <input type="text"
|
---|
16 | class="form-control"
|
---|
17 | id="projection_id"
|
---|
18 | name="projection_id"
|
---|
19 | th:value="(${movieProjection} != null ? ${movieProjection.getProjection_Id()} : '')"
|
---|
20 | required
|
---|
21 | placeholder="Your desired ID">
|
---|
22 | </div>
|
---|
23 | <div class="form-group">
|
---|
24 | <label for="projection_movie_start">Projection Movie Start</label>
|
---|
25 | <input type="text"
|
---|
26 | class="form-control"
|
---|
27 | id="projection_movie_start"
|
---|
28 | name="projection_movie_start"
|
---|
29 | th:value="(${movieProjection} != null ? ${movieProjection.getProjection_movie_start()} : '')"
|
---|
30 | required
|
---|
31 | placeholder="Enter Movie Start">
|
---|
32 | </div>
|
---|
33 |
|
---|
34 | <div class="form-group">
|
---|
35 | <label for="projection_movie_end">projection_movie_end</label>
|
---|
36 | <input type="text"
|
---|
37 | class="form-control"
|
---|
38 | id="projection_movie_end"
|
---|
39 | name="projection_movie_end"
|
---|
40 | th:value="(${movieProjection} != null ? ${movieProjection.getProjection_movie_end()} : '')"
|
---|
41 | required
|
---|
42 | placeholder="Enter Projection Movie End">
|
---|
43 | </div>
|
---|
44 |
|
---|
45 | <div class="form-group">
|
---|
46 | <label for="projection_screening_date">projection_screening_date</label>
|
---|
47 | <input type="text"
|
---|
48 | class="form-control"
|
---|
49 | id="projection_screening_date"
|
---|
50 | name="projection_screening_date"
|
---|
51 | th:value="(${movieProjection} != null ? ${movieProjection.getProjection_screening_date()} : '')"
|
---|
52 | required
|
---|
53 | placeholder="Enter Projection Screening Date">
|
---|
54 | </div>
|
---|
55 |
|
---|
56 | <div class="form-group">
|
---|
57 | <label for="projection_type">projection_type</label>
|
---|
58 | <input type="text"
|
---|
59 | class="form-control"
|
---|
60 | id="projection_type"
|
---|
61 | name="projection_type"
|
---|
62 | th:value="(${movieProjection} != null ? ${movieProjection.getProjection_type()} : '')"
|
---|
63 | required
|
---|
64 | placeholder="Enter Projection Type">
|
---|
65 | </div>
|
---|
66 |
|
---|
67 | <div class="form-group">
|
---|
68 | <label for="projection_price">projection_price</label>
|
---|
69 | <input type="text"
|
---|
70 | class="form-control"
|
---|
71 | id="projection_price"
|
---|
72 | name="projection_price"
|
---|
73 | th:value="(${movieProjection} != null ? ${movieProjection.getProjection_price()} : '')"
|
---|
74 | required
|
---|
75 | placeholder="Enter Projection Price">
|
---|
76 | </div>
|
---|
77 |
|
---|
78 | <div class="form-group">
|
---|
79 | <label>Movie</label>
|
---|
80 | <select name="movie_id" class="form-control">
|
---|
81 | <option th:if="${movieProjection} != null"
|
---|
82 | th:selected="${movieProjection.getMovie() != null &&
|
---|
83 | moviePRojection.getMovie().getMovie_id() == movie.getMovie_id()}"
|
---|
84 | th:each="movie : ${movie}"
|
---|
85 | th:value="${movie.getMovie_id()}"
|
---|
86 | th:text="${movie.getMovie_name()}">
|
---|
87 | </option>
|
---|
88 | <option th:if="${movieProjection} == null"
|
---|
89 | th:each="movie : ${movie}"
|
---|
90 | th:value="${movie.getMovie_id()}"
|
---|
91 | th:text="${movie.getMovie_name()}">
|
---|
92 | </option>
|
---|
93 | </select>
|
---|
94 | <label>Auditorium</label>
|
---|
95 | <select name="auditorium_id" class="form-control" autocomplete="off">
|
---|
96 | <option th:if="${auditorium != null}"
|
---|
97 | th:selected="${auditorium.getAuditorium_id() != null}"
|
---|
98 | th:each="auditorium : ${auditorium}"
|
---|
99 | th:value="${auditorium.getAuditorium_id()}"
|
---|
100 | th:text="${auditorium.getAuditorium_name()}" autocomplete="off">
|
---|
101 | </option>
|
---|
102 | <option th:if="${auditorium} == null"
|
---|
103 | th:each="auditorium: ${auditorium}"
|
---|
104 | th:value="${auditorium.getAuditorium_id()}"
|
---|
105 | th:text="${auditorium.getAuditorium_name()}" autocomplete="off">
|
---|
106 | </option>
|
---|
107 | </select>
|
---|
108 | </div>
|
---|
109 |
|
---|
110 | <button id="submit" type="submit" class="btn btn-primary">Submit</button>
|
---|
111 | <a type="button" class="btn btn-primary" href="/projections">Back</a>
|
---|
112 | <a type="button" class="btn btn-primary" href="/movies/add-form">Missing Movie? Add New Movie</a>
|
---|
113 | </form>
|
---|
114 | </div>
|
---|
115 | </div>
|
---|
116 | </div>
|
---|
117 | </th:block> |
---|