fix template crashing when defaultAddr == null
This commit is contained in:
parent
c1a0ecdcf3
commit
62df2346c3
@ -41,7 +41,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td th:text="${user.defaultDeliveryAddress.name}"></td>
|
||||
<td th:text="${user.defaultDeliveryAddress != null ? user.defaultDeliveryAddress.name : '-'}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>E-Mail</th>
|
||||
@ -56,7 +56,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Adresse</th>
|
||||
<td th:Text="${user.defaultDeliveryAddress}"></td>
|
||||
<td th:Text="${user.defaultDeliveryAddress != null ? user.defaultDeliveryAddress : ''}"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
@ -42,7 +42,7 @@
|
||||
<tr th:each="user: ${users}">
|
||||
<td th:text="${user.id}"></td>
|
||||
<td th:text="${user.created.toString().substring(0, 10)}"></td>
|
||||
<td th:text="${user.defaultDeliveryAddress.name}"></td>
|
||||
<td th:text="${user.defaultDeliveryAddress != null ? user.defaultDeliveryAddress.name : ''}"></td>
|
||||
<td th:text="${user.email}"></td>
|
||||
<td>
|
||||
<span th:text="${user.isActive} ? 'Aktiv,' : 'Inaktiv,'"></span>
|
||||
|
@ -73,7 +73,8 @@
|
||||
</div>
|
||||
<div>
|
||||
<label for="name">Name</label>
|
||||
<input class="full-width" type="text" name="name" id="name" placeholder="Nachname Vorname" th:value="${user.defaultDeliveryAddress.name}"
|
||||
<input class="full-width" type="text" name="name" id="name" placeholder="Nachname Vorname"
|
||||
th:value="${user.defaultDeliveryAddress != null ? user.defaultDeliveryAddress.name : ''}"
|
||||
required/>
|
||||
</div>
|
||||
</div>
|
||||
@ -81,7 +82,8 @@
|
||||
<div>
|
||||
<label for="address">Anschrift</label>
|
||||
<textarea rows="5" class="full-width" type="text" name="address" id="address"
|
||||
placeholder="Optional: Zusatz Optional: Unternehmen Straße Hausnummer Postleitzeit Ort Land" th:text="${user.defaultDeliveryAddress.addressString}"/>
|
||||
placeholder="Optional: Zusatz Optional: Unternehmen Straße Hausnummer Postleitzeit Ort Land"
|
||||
th:text="${user.defaultDeliveryAddress != null ? user.defaultDeliveryAddress.addressString : ''}"/>
|
||||
</div>
|
||||
<div>
|
||||
<button> Lieferinformation ändern</button>
|
||||
|
Reference in New Issue
Block a user