|
@ -2,6 +2,7 @@ |
|
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
|
|
<head> |
|
|
<head> |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
|
|
|
|
<link type="text/css" rel="stylesheet" th:href="@{../css/bookstore.css}" /> |
|
|
<link type="text/css" rel="stylesheet" th:href="@{../css/bootstrap.min.css}" /> |
|
|
<link type="text/css" rel="stylesheet" th:href="@{../css/bootstrap.min.css}" /> |
|
|
<title th:text="#{page.title.browser.edit}"></title> |
|
|
<title th:text="#{page.title.browser.edit}"></title> |
|
|
</head> |
|
|
</head> |
|
@ -11,39 +12,55 @@ |
|
|
|
|
|
|
|
|
<form th:object="${book}" action="#" th:action="@{{id}(id=${book.id})}" method="post"> |
|
|
<form th:object="${book}" action="#" th:action="@{{id}(id=${book.id})}" method="post"> |
|
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
|
|
|
|
|
<div class="form-group bookform-section"> |
|
|
<label for="BookAuthor" th:text="#{book.author}"></label><br> |
|
|
<label for="BookAuthor" th:text="#{book.author}"></label><br> |
|
|
<input class="form-control" type="text" th:field="*{author}" placeholder="Book author"/> |
|
|
<input class="form-control" type="text" th:field="*{author}" placeholder="Book author"/> |
|
|
<small class="form-text text-muted" th:text="#{book.desc.set.author}"></small> |
|
|
<small class="form-text text-muted" th:text="#{book.desc.set.author}"></small> |
|
|
|
|
|
|
|
|
|
|
|
<small style="display: inline-block;" class="form-text text-info" th:text="#{book.desc.example.headertext} + ': '"></small> |
|
|
|
|
|
<small style="display: inline-block;" class="form-text text-muted" th:text="#{book.desc.example.author}"></small> |
|
|
|
|
|
|
|
|
<div class="alert alert-danger mt-2" th:if="${#fields.hasErrors('author')}" |
|
|
<div class="alert alert-danger mt-2" th:if="${#fields.hasErrors('author')}" |
|
|
th:errors="*{author}">Invalid author name</div> |
|
|
th:errors="*{author}">Invalid author name</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
|
|
|
|
|
<div class="form-group bookform-section"> |
|
|
<label for="BookName" th:text="#{book.title}"></label><br> |
|
|
<label for="BookName" th:text="#{book.title}"></label><br> |
|
|
<input class="form-control" type="text" th:field="*{title}" placeholder="Book title"/> |
|
|
<input class="form-control" type="text" th:field="*{title}" placeholder="Book title"/> |
|
|
<small class="form-text text-muted" th:text="#{book.desc.set.title}"></small> |
|
|
<small class="form-text text-muted" th:text="#{book.desc.set.title}"></small> |
|
|
|
|
|
|
|
|
|
|
|
<small style="display: inline-block;" class="form-text text-info" th:text="#{book.desc.example.headertext} + ': '"></small> |
|
|
|
|
|
<small style="display: inline-block;" class="form-text text-muted" th:text="#{book.desc.example.title}"></small> |
|
|
|
|
|
|
|
|
<div class="alert alert-danger mt-2" th:if="${#fields.hasErrors('title')}" |
|
|
<div class="alert alert-danger mt-2" th:if="${#fields.hasErrors('title')}" |
|
|
th:errors="*{title}">Invalid title</div> |
|
|
th:errors="*{title}">Invalid title</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
|
|
|
|
|
<div class="form-group bookform-section"> |
|
|
<label for="BookISBN" th:text="#{book.isbn}"></label><br> |
|
|
<label for="BookISBN" th:text="#{book.isbn}"></label><br> |
|
|
<input class="form-control" type="text" th:field="*{isbn}" placeholder="Book ISBN code"/> |
|
|
<input class="form-control" type="text" th:field="*{isbn}" placeholder="Book ISBN code"/> |
|
|
<small class="form-text text-muted" th:text="#{book.desc.set.isbn}"></small> |
|
|
<small class="form-text text-muted" th:text="#{book.desc.set.isbn}"></small> |
|
|
|
|
|
|
|
|
|
|
|
<small style="display: inline-block;" class="form-text text-info" th:text="#{book.desc.example.headertext} + ': '"></small> |
|
|
|
|
|
<small style="display: inline-block;" class="form-text text-muted" th:text="#{book.desc.example.isbn}"></small> |
|
|
|
|
|
|
|
|
<div class="alert alert-danger mt-2" th:if="${#fields.hasErrors('isbn')}" |
|
|
<div class="alert alert-danger mt-2" th:if="${#fields.hasErrors('isbn')}" |
|
|
th:errors="*{isbn}">Invalid ISBN code</div> |
|
|
th:errors="*{isbn}">Invalid ISBN code</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
|
|
|
|
|
<div class="form-group bookform-section"> |
|
|
<label for="BookYear" th:text="#{book.year}"></label><br> |
|
|
<label for="BookYear" th:text="#{book.year}"></label><br> |
|
|
<input class="form-control" type="text" th:field="*{year}" placeholder="Book publication year (YYYY)"/> |
|
|
<input class="form-control" type="text" th:field="*{year}" placeholder="Book publication year (YYYY)"/> |
|
|
<small class="form-text text-muted" th:text="#{book.desc.set.year}"></small> |
|
|
<small class="form-text text-muted" th:text="#{book.desc.set.year}"></small> |
|
|
|
|
|
|
|
|
|
|
|
<small style="display: inline-block;" class="form-text text-info" th:text="#{book.desc.example.headertext} + ': '"></small> |
|
|
|
|
|
<small style="display: inline-block;" class="form-text text-muted" th:text="#{book.desc.example.year}"></small> |
|
|
|
|
|
|
|
|
<div class="alert alert-danger mt-2" th:if="${#fields.hasErrors('year')}" |
|
|
<div class="alert alert-danger mt-2" th:if="${#fields.hasErrors('year')}" |
|
|
th:errors="*{year}">Invalid year</div> |
|
|
th:errors="*{year}">Invalid year</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
|
|
|
|
|
<div class="form-group bookform-section"> |
|
|
<label for="fname" th:text="#{book.price}"></label> |
|
|
<label for="fname" th:text="#{book.price}"></label> |
|
|
<div class="input-group mb-2"> |
|
|
<div class="input-group mb-2"> |
|
|
<div class="input-group-prepend"> |
|
|
<div class="input-group-prepend"> |
|
@ -52,11 +69,15 @@ |
|
|
<input class="form-control" type="text" th:field="*{price}" placeholder="Book price"/> |
|
|
<input class="form-control" type="text" th:field="*{price}" placeholder="Book price"/> |
|
|
</div> |
|
|
</div> |
|
|
<small class="form-text text-muted" th:text="#{book.desc.set.price}"></small> |
|
|
<small class="form-text text-muted" th:text="#{book.desc.set.price}"></small> |
|
|
|
|
|
|
|
|
|
|
|
<small style="display: inline-block;" class="form-text text-info" th:text="#{book.desc.example.headertext} + ': '"></small> |
|
|
|
|
|
<small style="display: inline-block;" class="form-text text-muted" th:text="#{book.desc.example.price}"></small> |
|
|
|
|
|
|
|
|
<div class="alert alert-danger mt-2" th:if="${#fields.hasErrors('price')}" |
|
|
<div class="alert alert-danger mt-2" th:if="${#fields.hasErrors('price')}" |
|
|
th:errors="*{price}">Invalid price</div> |
|
|
th:errors="*{price}">Invalid price</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="form-group"> |
|
|
|
|
|
|
|
|
<div class="form-group bookform-section"> |
|
|
<label for="BookCategory">Category</label> |
|
|
<label for="BookCategory">Category</label> |
|
|
<select class="form-control" th:field="*{category}" th:selected="${book.category}"> |
|
|
<select class="form-control" th:field="*{category}" th:selected="${book.category}"> |
|
|
<option |
|
|
<option |
|
|