From f3ac94faebff80c3796eb5872c5f8823da8a76e6 Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Sat, 19 Sep 2020 00:00:54 +0300 Subject: [PATCH] Add example input values for users; Update web form styles Signed-off-by: Pekka Helenius --- .../src/main/resources/messages.properties | 7 ++++ .../src/main/resources/templates/bookadd.html | 33 +++++++++++++++---- .../main/resources/templates/bookedit.html | 33 +++++++++++++++---- .../main/resources/templates/booklist.html | 1 + 4 files changed, 62 insertions(+), 12 deletions(-) diff --git a/bookstore/src/main/resources/messages.properties b/bookstore/src/main/resources/messages.properties index 122cdf2..7e90fbb 100644 --- a/bookstore/src/main/resources/messages.properties +++ b/bookstore/src/main/resources/messages.properties @@ -16,6 +16,13 @@ book.desc.set.isbn = Set book ISBN code book.desc.set.year = Set book publication year book.desc.set.price = Set book price book.desc.set.category = Select appropriate category + +book.desc.example.headertext = Valid inputs +book.desc.example.author = Andrzej Sapkowski +book.desc.example.title = The Witcher\:\ The Lady of the Lake +book.desc.example.isbn = 1212121-3 or 4545454-67 or 6767676-890 +book.desc.example.year = 1914 +book.desc.example.price = 45.67 book.error.author = Invalid author name book.error.title = Invalid title diff --git a/bookstore/src/main/resources/templates/bookadd.html b/bookstore/src/main/resources/templates/bookadd.html index bd4209b..0303019 100644 --- a/bookstore/src/main/resources/templates/bookadd.html +++ b/bookstore/src/main/resources/templates/bookadd.html @@ -2,6 +2,7 @@ + @@ -11,39 +12,55 @@
-
+
+ + + +
Invalid author name
-
+
+ + + +
Invalid title
-
+
+ + + +
Invalid ISBN code
-
+
+ + + +
Invalid year
-
+
@@ -52,11 +69,15 @@
+ + + +
Invalid price
-
+
+ + + +
Invalid author name
-
+

+ + + +
Invalid title
-
+

+ + + +
Invalid ISBN code
-
+

+ + + +
Invalid year
-
+
@@ -52,11 +69,15 @@
+ + + +
Invalid price
-
+