mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 13:05:49 +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()) {
|
||||
pet.setOwner(owner);
|
||||
model.put("pet", pet);
|
||||
model.put("owner", owner);
|
||||
return VIEWS_PETS_CREATE_OR_UPDATE_FORM;
|
||||
} else {
|
||||
owner.addPet(pet);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Owner</label>
|
||||
<div class="col-sm-10">
|
||||
<span th:text="${pet.owner?.firstName + ' ' + pet.owner?.lastName}" />
|
||||
<span th:text="${owner.firstName + ' ' + owner.lastName}" />
|
||||
</div>
|
||||
</div>
|
||||
<input
|
||||
|
|
Loading…
Reference in a new issue