1
0
hs.hsadmin.ng/src/main/webapp/app/entities/customer/customer-update.component.html
2019-04-24 14:36:11 +02:00

222 lines
16 KiB
HTML

<div class="row justify-content-center">
<div class="col-8">
<form name="editForm" role="form" novalidate (ngSubmit)="save()" #editForm="ngForm">
<h2 id="jhi-customer-heading" jhiTranslate="hsadminNgApp.customer.home.createOrEditLabel">Create or edit a Customer</h2>
<div>
<jhi-alert-error></jhi-alert-error>
<div class="form-group" [hidden]="!customer.id">
<label for="id" jhiTranslate="global.field.id">ID</label>
<input type="text" class="form-control" id="id" name="id"
[(ngModel)]="customer.id" readonly />
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.reference" for="field_reference">Reference</label>
<input type="number" class="form-control" name="reference" id="field_reference"
[(ngModel)]="customer.reference" required min="10000" jhiMin="10000" max="99999" jhiMax="99999"/>
<div [hidden]="!(editForm.controls.reference?.dirty && editForm.controls.reference?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.reference?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.reference?.errors?.min" jhiTranslate="entity.validation.min" [translateValues]="{ min: 10000 }">
This field should be at least 10000.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.reference?.errors?.max" jhiTranslate="entity.validation.max" [translateValues]="{ max: 99999 }">
This field cannot be more than 99999.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.reference?.errors?.number" jhiTranslate="entity.validation.number">
This field should be a number.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.prefix" for="field_prefix">Prefix</label>
<input type="text" class="form-control" name="prefix" id="field_prefix"
[(ngModel)]="customer.prefix" required maxlength="3" pattern="[a-z][a-z0-9]+"/>
<div [hidden]="!(editForm.controls.prefix?.dirty && editForm.controls.prefix?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.prefix?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.prefix?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 3 }">
This field cannot be longer than 3 characters.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.prefix?.errors?.pattern" jhiTranslate="entity.validation.pattern" [translateValues]="{ pattern: 'Prefix' }">
This field should follow pattern for "Prefix".
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.name" for="field_name">Name</label>
<input type="text" class="form-control" name="name" id="field_name"
[(ngModel)]="customer.name" required maxlength="80"/>
<div [hidden]="!(editForm.controls.name?.dirty && editForm.controls.name?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.name?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.name?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.kind" for="field_kind">Kind</label>
<select class="form-control" name="kind" [(ngModel)]="customer.kind" id="field_kind" required>
<option value="NATURAL">{{'hsadminNgApp.CustomerKind.NATURAL' | translate}}</option>
<option value="LEGAL">{{'hsadminNgApp.CustomerKind.LEGAL' | translate}}</option>
</select>
<div [hidden]="!(editForm.controls.kind?.dirty && editForm.controls.kind?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.kind?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.birthDate" for="field_birthDate">Birth Date</label>
<div class="input-group">
<input id="field_birthDate" type="text" class="form-control" name="birthDate" ngbDatepicker #birthDateDp="ngbDatepicker" [(ngModel)]="customer.birthDate"
/>
<span class="input-group-append">
<button type="button" class="btn btn-secondary" (click)="birthDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
</span>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.birthPlace" for="field_birthPlace">Birth Place</label>
<input type="text" class="form-control" name="birthPlace" id="field_birthPlace"
[(ngModel)]="customer.birthPlace" maxlength="80"/>
<div [hidden]="!(editForm.controls.birthPlace?.dirty && editForm.controls.birthPlace?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.birthPlace?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.registrationCourt" for="field_registrationCourt">Registration Court</label>
<input type="text" class="form-control" name="registrationCourt" id="field_registrationCourt"
[(ngModel)]="customer.registrationCourt" maxlength="80"/>
<div [hidden]="!(editForm.controls.registrationCourt?.dirty && editForm.controls.registrationCourt?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.registrationCourt?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.registrationNumber" for="field_registrationNumber">Registration Number</label>
<input type="text" class="form-control" name="registrationNumber" id="field_registrationNumber"
[(ngModel)]="customer.registrationNumber" maxlength="80"/>
<div [hidden]="!(editForm.controls.registrationNumber?.dirty && editForm.controls.registrationNumber?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.registrationNumber?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.vatRegion" for="field_vatRegion">Vat Region</label>
<select class="form-control" name="vatRegion" [(ngModel)]="customer.vatRegion" id="field_vatRegion" required>
<option value="DOMESTIC">{{'hsadminNgApp.VatRegion.DOMESTIC' | translate}}</option>
<option value="EU">{{'hsadminNgApp.VatRegion.EU' | translate}}</option>
<option value="OTHER">{{'hsadminNgApp.VatRegion.OTHER' | translate}}</option>
</select>
<div [hidden]="!(editForm.controls.vatRegion?.dirty && editForm.controls.vatRegion?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.vatRegion?.errors?.required" jhiTranslate="entity.validation.required">
This field is required.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.vatNumber" for="field_vatNumber">Vat Number</label>
<input type="text" class="form-control" name="vatNumber" id="field_vatNumber"
[(ngModel)]="customer.vatNumber" maxlength="40"/>
<div [hidden]="!(editForm.controls.vatNumber?.dirty && editForm.controls.vatNumber?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.vatNumber?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 40 }">
This field cannot be longer than 40 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualSalutation" for="field_contractualSalutation">Contractual Salutation</label>
<input type="text" class="form-control" name="contractualSalutation" id="field_contractualSalutation"
[(ngModel)]="customer.contractualSalutation" maxlength="80"/>
<div [hidden]="!(editForm.controls.contractualSalutation?.dirty && editForm.controls.contractualSalutation?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.contractualSalutation?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
</small>
</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"/>
<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">
This field is required.
</small>
<small class="form-text text-danger"
[hidden]="!editForm.controls.contractualAddress?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
This field cannot be longer than 400 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.billingSalutation" for="field_billingSalutation">Billing Salutation</label>
<input type="text" class="form-control" name="billingSalutation" id="field_billingSalutation"
[(ngModel)]="customer.billingSalutation" maxlength="80"/>
<div [hidden]="!(editForm.controls.billingSalutation?.dirty && editForm.controls.billingSalutation?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.billingSalutation?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
This field cannot be longer than 80 characters.
</small>
</div>
</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"/>
<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 }">
This field cannot be longer than 400 characters.
</small>
</div>
</div>
<div class="form-group">
<label class="form-control-label" jhiTranslate="hsadminNgApp.customer.remark" for="field_remark">Remark</label>
<input type="text" class="form-control" name="remark" id="field_remark"
[(ngModel)]="customer.remark" maxlength="160"/>
<div [hidden]="!(editForm.controls.remark?.dirty && editForm.controls.remark?.invalid)">
<small class="form-text text-danger"
[hidden]="!editForm.controls.remark?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
This field cannot be longer than 160 characters.
</small>
</div>
</div>
</div>
<div>
<button type="button" id="cancel-save" class="btn btn-secondary" (click)="previousState()">
<fa-icon [icon]="'ban'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.cancel">Cancel</span>
</button>
<button type="submit" id="save-entity" [disabled]="editForm.form.invalid || isSaving" class="btn btn-primary">
<fa-icon [icon]="'save'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.save">Save</span>
</button>
</div>
</form>
</div>
</div>