mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
Merge df61c116c8
into ffa967c94b
This commit is contained in:
commit
835b334751
2 changed files with 2 additions and 1 deletions
|
@ -105,6 +105,7 @@ class PetController {
|
||||||
if (result.hasErrors()) {
|
if (result.hasErrors()) {
|
||||||
pet.setOwner(owner);
|
pet.setOwner(owner);
|
||||||
model.put("pet", pet);
|
model.put("pet", pet);
|
||||||
|
model.put("owner", owner);
|
||||||
return VIEWS_PETS_CREATE_OR_UPDATE_FORM;
|
return VIEWS_PETS_CREATE_OR_UPDATE_FORM;
|
||||||
} else {
|
} else {
|
||||||
owner.addPet(pet);
|
owner.addPet(pet);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label">Owner</label>
|
<label class="col-sm-2 control-label">Owner</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<span th:text="${pet.owner?.firstName + ' ' + pet.owner?.lastName}" />
|
<span th:text="${owner.firstName + ' ' + owner.lastName}" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
|
|
Loading…
Reference in a new issue