Changeset cc52b09
- Timestamp:
- 02/02/23 23:05:16 (21 months ago)
- Branches:
- master
- Children:
- a436340
- Parents:
- 9280859
- Location:
- src/main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/edu/gjoko/schedlr/controllers/HomePageController.java
r9280859 rcc52b09 22 22 return "homepage"; 23 23 } 24 25 @GetMapping("/search")26 public String getAppointments(Model model, @ModelAttribute("search")Search search) {27 model.addAttribute("search", search);28 return "homepage";29 }30 24 } -
src/main/resources/application.properties
r9280859 rcc52b09 1 spring.datasource.url=jdbc:postgresql://localhost:543 2/schedlr1 spring.datasource.url=jdbc:postgresql://localhost:5433/schedlr 2 2 spring.datasource.username=postgres 3 spring.datasource.password= postgres3 spring.datasource.password=silic0n 4 4 5 5 spring.sql.init.mode=never -
src/main/resources/static/js/homepage.js
r9280859 rcc52b09 155 155 ], 156 156 }); 157 $("#search").click(function () { 158 alert("qweqew"); 157 159 160 $.ajax({ 161 url: "http://localhost:8080/events" 162 }).then(function(data) { 163 console.log(data); 164 }); 165 }); 158 166 159 167 }); 168 169 function search() { 170 171 } -
src/main/resources/templates/homepage.html
r9280859 rcc52b09 26 26 <div class="card"> 27 27 <div class="card-body py-5 px-md-5"> 28 <form th:action="@{/search}" method="get" th:object="${search}">29 28 <div> 30 29 <label for="student-birth-date">Date of search:</label> 31 <input type="date" th:field="${search.date}"id="student-birth-date"/>30 <input type="date" id="student-birth-date"/> 32 31 </div> 33 32 <div> 34 <button type="submit" class="button" >Search</button>33 <button type="submit" class="button" id="search">Search</button> 35 34 </div> 36 </form>37 35 </div> 38 36 </div>
Note:
See TracChangeset
for help on using the changeset viewer.