diff --git a/src/main/java/org/springframework/samples/petclinic/Owner.java b/src/main/java/org/springframework/samples/petclinic/Owner.java index cb24f263e..4bf7f09ce 100644 --- a/src/main/java/org/springframework/samples/petclinic/Owner.java +++ b/src/main/java/org/springframework/samples/petclinic/Owner.java @@ -12,9 +12,8 @@ import javax.persistence.Entity; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.validation.constraints.Digits; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; +import org.hibernate.validator.constraints.NotEmpty; import org.springframework.beans.support.MutableSortDefinition; import org.springframework.beans.support.PropertyComparator; import org.springframework.core.style.ToStringCreator; @@ -30,15 +29,15 @@ import org.springframework.core.style.ToStringCreator; @Entity @Table(name="owners") public class Owner extends Person { @Column(name="address") - @NotNull @Size(min = 1) + @NotEmpty private String address; @Column(name="city") - @NotNull @Size(min = 1) + @NotEmpty private String city; @Column(name="telephone") - @NotNull @Digits(fraction = 0, integer = 10) + @NotEmpty @Digits(fraction = 0, integer = 10) private String telephone; @OneToMany(cascade=CascadeType.ALL, mappedBy="owner") diff --git a/src/main/resources/log4j.xml b/src/main/resources/log4j.xml index 817cc7364..40506650e 100755 --- a/src/main/resources/log4j.xml +++ b/src/main/resources/log4j.xml @@ -12,7 +12,7 @@ - + @@ -24,7 +24,7 @@ - + diff --git a/src/main/webapp/WEB-INF/jsp/fragments/bodyHeader.jsp b/src/main/webapp/WEB-INF/jsp/fragments/bodyHeader.jsp index 71733bf6c..f360fec67 100644 --- a/src/main/webapp/WEB-INF/jsp/fragments/bodyHeader.jsp +++ b/src/main/webapp/WEB-INF/jsp/fragments/bodyHeader.jsp @@ -8,7 +8,7 @@ diff --git a/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp b/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp index 763aac06c..87025b805 100644 --- a/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp @@ -22,41 +22,56 @@
-
- -
- - + + +
+ +
+ + ${status.errorMessage} +
-
-
- -
- - + + + +
+ +
+ + ${status.errorMessage} +
-
-
- -
- - + + + +
+ +
+ + ${status.errorMessage} +
-
-
- -
- - + + + +
+ +
+ + ${status.errorMessage} +
-
-
- -
- - + + + +
+ +
+ + ${status.errorMessage} +
-
+
diff --git a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp index 3ee7caeca..b118a6fc3 100644 --- a/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/pets/createOrUpdatePetForm.jsp @@ -1,43 +1,74 @@ -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> -<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> - + - - - - - - - - - - - - -
- + - -
-
- -
- -
-
+ $(function() { + $("#birthDate").datepicker(); + }); + +
+ + + + + + + + + + +

+ New + Pet +

+ + +
+ -
-
-
+ +
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+ + +
+
+ + + + + + + + +
+ + + + +
diff --git a/src/main/webapp/resources/css/petclinic.css b/src/main/webapp/resources/css/petclinic.css index 8e31eaedf..590cbe06e 100644 --- a/src/main/webapp/resources/css/petclinic.css +++ b/src/main/webapp/resources/css/petclinic.css @@ -15,3 +15,7 @@ input[type="text"] { .navbar .nav > li > a { color: #000000; } + + .form-horizontal .control-label { + text-align: left; +}