1
0

properly display line-breaks in customer address fields

This commit is contained in:
Michael Hoennig
2019-04-09 11:33:34 +02:00
parent fe60e789d1
commit 9039fa5109
6 changed files with 62 additions and 12 deletions

View File

@ -19,7 +19,7 @@
</dd>
<dt><span jhiTranslate="hsadminNgApp.customer.contractualAddress">Contractual Address</span></dt>
<dd>
<span>{{customer.contractualAddress}}</span>
<span [innerHTML]="customer.contractualAddress | linebreaks"></span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span></dt>
<dd>
@ -27,7 +27,7 @@
</dd>
<dt><span jhiTranslate="hsadminNgApp.customer.billingAddress">Billing Address</span></dt>
<dd>
<span>{{customer.billingAddress}}</span>
<span [innerHTML]="customer.billingAddress | linebreaks"></span>
</dd>
<dt><span jhiTranslate="hsadminNgApp.customer.billingSalutation">Billing Salutation</span></dt>
<dd>

View File

@ -63,9 +63,10 @@
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualAddress" for="field_contractualAddress">Contractual Address</label>
<input type="text" class="form-control" name="contractualAddress" id="field_contractualAddress"
[(ngModel)]="customer.contractualAddress" required maxlength="400"/>
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualAddress"
for="field_contractualAddress">Contractual Address X</label>
<textarea class="form-control" name="contractualAddress" id="field_contractualAddress" rows="3"
[(ngModel)]="customer.contractualAddress" required maxlength="400"></textarea>
<div [hidden]="!(editForm.controls.contractualAddress?.dirty && editForm.controls.contractualAddress?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.contractualAddress?.errors?.required" jhiTranslate="entity.validation.required">
@ -90,8 +91,8 @@
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.billingAddress" for="field_billingAddress">Billing Address</label>
<input type="text" class="form-control" name="billingAddress" id="field_billingAddress"
[(ngModel)]="customer.billingAddress" maxlength="400"/>
<textarea class="form-control" name="billingAddress" id="field_billingAddress" rows="3"
[(ngModel)]="customer.billingAddress" maxlength="400"></textarea>
<div [hidden]="!(editForm.controls.billingAddress?.dirty && editForm.controls.billingAddress?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.billingAddress?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">

View File

@ -37,9 +37,9 @@
<td>{{customer.number}}</td>
<td>{{customer.prefix}}</td>
<td>{{customer.name}}</td>
<td>{{customer.contractualAddress}}</td>
<td>{{customer.contractualAddress | linebreaks:' | '}}</td>
<td>{{customer.contractualSalutation}}</td>
<td>{{customer.billingAddress}}</td>
<td>{{customer.billingAddress | linebreaks:' | '}}</td>
<td>{{customer.billingSalutation}}</td>
<td class="text-right">
<div class="btn-group flex-btn-group-container">