summaryrefslogtreecommitdiffhomepage
path: root/src/main/resources/templates/articles/edit.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/templates/articles/edit.html')
-rw-r--r--src/main/resources/templates/articles/edit.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/resources/templates/articles/edit.html b/src/main/resources/templates/articles/edit.html
index ccfbe85..f4faee9 100644
--- a/src/main/resources/templates/articles/edit.html
+++ b/src/main/resources/templates/articles/edit.html
@@ -15,13 +15,13 @@
for="title">
Title
</label>
- <input class="appearance-none block w-full bg-gray-200 text-gray-700 border border-red-500 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white"
+ <input class="appearance-none block w-full bg-gray-200 text-gray-700 border rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white"
id="title"
type="text"
name="title"
th:field="*{title}"
placeholder="Yep">
- <p class="text-red-500 text-xs italic">Please fill out this field.</p>
+ <p th:if="${#fields.hasErrors('title')}" th:errors="*{title}" class="text-red-500 text-xs italic">Please fill out this field.</p>
</div>
<div class="w-full md:w-1/2 px-3">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2"
@@ -34,6 +34,7 @@
name="photoUrl"
th:field="*{photoUrl}"
placeholder="Doe">
+ <p th:if="${#fields.hasErrors('photoUrl')}" th:errors="*{photoUrl}" class="text-red-500 text-xs italic">Please fill out this field.</p>
</div>
</div>
<div class="flex flex-wrap -mx-3 mb-6">
@@ -48,11 +49,12 @@
name="content"
th:field="*{content}"
placeholder="Doe">
+ <p th:if="${#fields.hasErrors('content')}" th:errors="*{content}" class="text-red-500 text-xs italic">Please fill out this field.</p>
</div>
</div>
<div class="flex flex-wrap mb-2">
</div>
- <button type="submit" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Create</button>
+ <button type="submit" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Update</button>
</form>
</div>