|
|
@@ -24,43 +24,55 @@
|
|
|
|
|
|
<div class="container border border-info
|
|
|
rounded-3 text-center p-4">
|
|
|
+ <h3>Place Details</h3>
|
|
|
<form th:object="${placeCommand}" th:action="@{/place}" 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-xs-3" style="margin-right:20px;">
|
|
|
- <label for="name">Name</label>
|
|
|
- <input class="form-control" id="name"
|
|
|
- th:field="*{name}" type="text">
|
|
|
- <div th:if="${#fields.hasErrors('name')}">
|
|
|
- <ul class="text-danger">
|
|
|
- <li th:each="err : ${#fields.errors('name')}" th:text="${err}"/>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-xs-2">
|
|
|
- <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>
|
|
|
- <div class="form-group row justify-content-center">
|
|
|
- <div class="col-xs-3" style="margin-right:20px;">
|
|
|
- <label for="region">Region:</label>
|
|
|
- <select id="region" name="region" th:field="*{region}"
|
|
|
- class="form-control" th:errorclass="has-error">
|
|
|
- <option th:value="${''}" th:text="${''}"></option>
|
|
|
- <option th:each="region : ${regions}"
|
|
|
- th:value="${region.id}" th:text="${region.name}"></option>
|
|
|
- </select>
|
|
|
- <div th:if="${#fields.hasErrors('region')}">
|
|
|
- <ul class="text-danger">
|
|
|
- <li th:each="err : ${#fields.errors('region')}" th:text="${err}"/>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <table style="width:100%;">
|
|
|
+ <tr>
|
|
|
+ <td style="text-align: right;">
|
|
|
+ <label for="id"><span style="color: rgb(255,0,0);">*</span>Database Id : </label>
|
|
|
+ </td>
|
|
|
+ <td style="text-align: left;">
|
|
|
+ <input class="form-control" id="id"
|
|
|
+ th:field="*{id}" type="text" readonly>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="text-align: right;">
|
|
|
+ <label for="name">Name : </label>
|
|
|
+ </td>
|
|
|
+ <td style="text-align: left;">
|
|
|
+ <input class="form-control" id="name"
|
|
|
+ th:field="*{name}" type="text">
|
|
|
+ <div th:if="${#fields.hasErrors('name')}">
|
|
|
+ <ul class="text-danger">
|
|
|
+ <li th:each="err : ${#fields.errors('name')}" th:text="${err}"/>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="text-align: right;">
|
|
|
+ <label for="region">Region : </label>
|
|
|
+ </td>
|
|
|
+ <td style="text-align: left;">
|
|
|
+ <select id="region" name="region" th:field="*{region}"
|
|
|
+ class="form-control" th:errorclass="has-error">
|
|
|
+ <option th:value="${''}" th:text="${''}"></option>
|
|
|
+ <option th:each="region : ${regions}"
|
|
|
+ th:value="${region.id}" th:text="${region.name}"></option>
|
|
|
+ </select>
|
|
|
+ <div th:if="${#fields.hasErrors('region')}">
|
|
|
+ <ul class="text-danger">
|
|
|
+ <li th:each="err : ${#fields.errors('region')}" th:text="${err}"/>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr><td> </td></tr>
|
|
|
+ </table>
|
|
|
<button type="submit" class="btn btn-primary">Commit</button>
|
|
|
<a class="btn btn-secondary" th:href="@{/places}" th:text="${'List all'}">List all</a>
|
|
|
<a class="btn btn-success" th:href="@{/}" th:text="${'Home'}">Home</a>
|