Skip to content
Snippets Groups Projects
Commit 6e079b23 authored by michaelisvy's avatar michaelisvy
Browse files

Error control on description was missing

Took that opportunity to use custom tag (14 lines versus 2 lines)
parent f0bf6927
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %> <%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %>
<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %>
<html lang="en"> <html lang="en">
...@@ -40,22 +42,10 @@ ...@@ -40,22 +42,10 @@
</table> </table>
<form:form modelAttribute="visit"> <form:form modelAttribute="visit">
<div class="control-group">
<label class="control-label">Date </label> <petclinic:inputField label="date" name="date" />
<petclinic:inputField label="description" name="description" />
<div class="controls">
<form:input path="date"/>
<span class="help-inline"><form:errors path="date"/></span>
</div>
</div>
<div class="control-group">
<label class="control-label">Description </label>
<div class="controls">
<form:input path="description"/>
<span class="help-inline"><form:errors path="description"/></span>
</div>
</div>
<div class="form-actions"> <div class="form-actions">
<input type="hidden" name="petId" value="${visit.pet.id}"/> <input type="hidden" name="petId" value="${visit.pet.id}"/>
<button type="submit">Add Visit</button> <button type="submit">Add Visit</button>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment