| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <!DOCTYPE html>
- <!--suppress XmlHighlighting -->
- <html lang="en" xmlns:th="http://www.thymeleaf.org">
- <head>
- <!-- Required meta tags -->
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <!-- Bootstrap CSS -->
- <!--suppress SpellCheckingInspection -->
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
- integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
- <!--suppress SpellCheckingInspection -->
- <script src="https://code.jquery.com/jquery-3.6.0.min.js"
- integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
- <link rel="stylesheet" href="https://code.jquery.com/ui/1.14.1/themes/base/jquery-ui.css">
- <script src="https://code.jquery.com/jquery-3.7.1.js"></script>
- <script src="https://code.jquery.com/ui/1.14.1/jquery-ui.js"></script>
- <!--suppress JSUnresolvedReference -->
- <script>
- $(function () {
- $("#datepicker").datepicker({dateFormat: "dd-mm-yy"}).val();
- });
- </script>
- <title>Grants - census form</title>
- </head>
- <body>
- <!--/*@thymesVar id="censusCommand" type="scot.carricksoftware.grants.commands.census.CensusCommand"*/-->
- <!--/*@thymesVar id="place" type="scot.carricksoftware.grants.domains.places.Place"*/-->
- <div th:insert="~{fragments/layout::banner}"></div>
- <div class="container border border-info
- rounded-3 text-center p-4">
- <form th:object="${censusCommand}" th:action="@{/census}" method="post">
- <div th:if="${#fields.hasErrors('*')}" class="alert alert-danger">
- <p>Please Correct The Errors Below</p>
- </div>
- <div class="form-group row justify-content-center">
- <div class="col-md-3">
- <label for="id">Database Id<span style="color: rgb(255,0,0);">*</span></label>
- <input class="form-control" id="id"
- th:field="*{id}" type="text" readonly>
- </div>
- <div class="col-md-3">
- <label for="censusDate">Date</label>
- <div>
- <select id="censusDate" style="width: 200px;" name="censusDate" th:field="*{censusDate}">
- <option th:value="${''}" th:text="${''}"></option>
- <option th:each="value : ${T(scot.carricksoftware.grants.enums.census.CensusDate).values()}"
- th:value="${value}" th:text="${value.label}"></option>
- </select>
- <div th:if="${#fields.hasErrors('censusDate')}">
- <ul class="text-danger">
- <li th:each="err : ${#fields.errors('censusDate')}" th:text="${err}"/>
- </ul>
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <label for="place">Place</label>
- <div>
- <select id="place" style="width: 200px;" name="place" th:field="*{place}">
- <option th:value="${''}" th:text="${''}"></option>
- <option th:each="place : ${places}"
- th:value="${place.id}" th:text="${place.toString()}"></option>
- </select>
- <div th:if="${#fields.hasErrors('place')}">
- <ul class="text-danger">
- <li th:each="err : ${#fields.errors('place')}" th:text="${err}"/>
- </ul>
- </div>
- </div>
- </div>
- <div class="col-md-3">
- <label for="boundaryType">Boundary Type</label>
- <div>
- <select id="boundaryType" style="width: 200px;" name="boundaryType" th:field="*{boundaryType}">
- <option th:value="${''}" th:text="${''}"></option>
- <option th:each="value : ${T(scot.carricksoftware.grants.enums.census.CensusBoundaryType).values()}"
- th:value="${value}" th:text="${value.label}"></option>
- </select>
- <div th:if="${#fields.hasErrors('boundaryType')}">
- <ul class="text-danger">
- <li th:each="err : ${#fields.errors('boundaryType')}" th:text="${err}"/>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <div class="form-group row justify-content-center">
- <div class="col-md-3">
- <label for="inhabitedRooms">Inhabited Rooms</label>
- <input class="form-control" id="inhabitedRooms"
- th:field="*{inhabitedRooms}" type="text">
- <div th:if="${#fields.hasErrors('inhabitedRooms')}">
- <ul class="text-danger">
- <li th:each="err : ${#fields.errors('inhabitedRooms')}" th:text="${err}"/>
- </ul>
- </div>
- </div>
- <div class="col-md-3">
- <label for="roomsWithWindows">Rooms With Windows</label>
- <input class="form-control" id="roomsWithWindows"
- th:field="*{roomsWithWindows}" type="text">
- <div th:if="${#fields.hasErrors('roomsWithWindows')}">
- <ul class="text-danger">
- <li th:each="err : ${#fields.errors('roomsWithWindows')}" th:text="${err}"/>
- </ul>
- </div>
- </div>
- </div>
- <button type="submit" class="btn btn-primary">Commit</button>
- <a class="btn btn-secondary" th:href="@{/censuses}" th:text="${'List all'}">List all</a>
- <a class="btn btn-success" th:href="@{/}" th:text="${'Home'}">Home</a>
- <h6><span style="color: rgb(255,0,0);">*</span><span> Cannot be edited</span></h6>
- </form>
- </div>
- </body>
- </html>
|