|
|
@ -6,27 +6,25 @@
|
|
|
|
<body>
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
<div class="container">
|
|
|
|
<div th:replace="fragments :: navbar"></div>
|
|
|
|
<div th:replace="fragments :: navbar"></div>
|
|
|
|
<h1>Messages : Create</h1>
|
|
|
|
<div class="float-right mt-2">
|
|
|
|
<form id="messageForm" th:action="@{/(form)}" th:object="${message}"
|
|
|
|
<a class="btn btn-primary btn-sm" th:href="@{/}" href="messages.html"> Messages </a>
|
|
|
|
action="#" method="post">
|
|
|
|
</div>
|
|
|
|
<div th:if="${#fields.hasErrors('*')}" class="alert alert-error">
|
|
|
|
<h4 class="float-left mt-2">Messages : Create</h4>
|
|
|
|
<p th:each="error : ${#fields.errors('*')}" th:text="${error}">
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
Validation error</p>
|
|
|
|
<form id="messageForm" th:action="@{/(form)}" th:object="${message}" action="#" method="post">
|
|
|
|
|
|
|
|
<div th:if="${#fields.hasErrors('*')}" class="alert alert-danger" role="alert">
|
|
|
|
|
|
|
|
<p th:each="error : ${#fields.errors('*')}" class="m-0" th:text="${error}">Validation error</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="pull-right">
|
|
|
|
<input type="hidden" th:field="*{id}" th:class="${'form-control' + (#fields.hasErrors('id') ? ' is-invalid' : '')}"/>
|
|
|
|
<a th:href="@{/}" href="messages.html"> Messages </a>
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
|
|
<label for="summary">Summary</label>
|
|
|
|
|
|
|
|
<input type="text" th:field="*{summary}" th:class="${'form-control' + (#fields.hasErrors('summary') ? ' is-invalid' : '')}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<input type="hidden" th:field="*{id}"
|
|
|
|
<div class="form-group">
|
|
|
|
th:class="${#fields.hasErrors('id')} ? 'field-error'" /> <label
|
|
|
|
<label for="text">Message</label>
|
|
|
|
for="summary">Summary</label> <input type="text"
|
|
|
|
<textarea th:field="*{text}" th:class="${'form-control' + (#fields.hasErrors('text') ? ' is-invalid' : '')}"></textarea>
|
|
|
|
th:field="*{summary}"
|
|
|
|
|
|
|
|
th:class="${#fields.hasErrors('summary')} ? 'field-error'" /> <label
|
|
|
|
|
|
|
|
for="text">Message</label>
|
|
|
|
|
|
|
|
<textarea th:field="*{text}"
|
|
|
|
|
|
|
|
th:class="${#fields.hasErrors('text')} ? 'field-error'"></textarea>
|
|
|
|
|
|
|
|
<div class="form-actions">
|
|
|
|
|
|
|
|
<input type="submit" value="Save" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|