mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 20:35:49 +00:00
Error control on description was missing
Took that opportunity to use custom tag (14 lines versus 2 lines)
This commit is contained in:
parent
f0bf692767
commit
6e079b23bb
1 changed files with 6 additions and 16 deletions
|
@ -5,6 +5,8 @@
|
|||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %>
|
||||
<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %>
|
||||
|
||||
|
||||
<html lang="en">
|
||||
|
||||
|
@ -40,22 +42,10 @@
|
|||
</table>
|
||||
|
||||
<form:form modelAttribute="visit">
|
||||
<div class="control-group">
|
||||
<label class="control-label">Date </label>
|
||||
|
||||
<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>
|
||||
<petclinic:inputField label="date" name="date" />
|
||||
<petclinic:inputField label="description" name="description" />
|
||||
|
||||
<div class="controls">
|
||||
<form:input path="description"/>
|
||||
<span class="help-inline"><form:errors path="description"/></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="hidden" name="petId" value="${visit.pet.id}"/>
|
||||
<button type="submit">Add Visit</button>
|
||||
|
|
Loading…
Reference in a new issue