Merge branch 'refs/heads/komoot-import' into sattelgeschichten
This commit is contained in:
commit
67391038d6
2 changed files with 7 additions and 2 deletions
|
|
@ -4,6 +4,8 @@ import org.springframework.stereotype.Controller;
|
|||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* Serves the Komoot import preview page.
|
||||
*/
|
||||
|
|
@ -12,7 +14,10 @@ public class KomootImportViewController {
|
|||
|
||||
@GetMapping("/komoot-import")
|
||||
public String komootImportPage(Model model) {
|
||||
LocalDate today = LocalDate.now();
|
||||
model.addAttribute("pageTitle", "Komoot Import");
|
||||
model.addAttribute("defaultStartDate", today.withDayOfYear(1));
|
||||
model.addAttribute("defaultEndDate", today);
|
||||
return "activities/komoot";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,11 +56,11 @@
|
|||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label for="startDate" class="form-label">Start Date</label>
|
||||
<input type="date" class="form-control" id="startDate" name="startDate">
|
||||
<input type="date" class="form-control" id="startDate" name="startDate" th:value="${defaultStartDate}">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="endDate" class="form-label">End Date</label>
|
||||
<input type="date" class="form-control" id="endDate" name="endDate">
|
||||
<input type="date" class="form-control" id="endDate" name="endDate" th:value="${defaultEndDate}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-text">Both dates must be set together. Inclusive, day-based filter.</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue