58 lines
3.7 KiB
HTML
58 lines
3.7 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-membership-heading" jhiTranslate="hsadminNgApp.membership.home.createOrEditLabel">Create or edit a Membership</h2>
|
|
<div>
|
|
<jhi-alert-error></jhi-alert-error>
|
|
<div class="form-group" [hidden]="!membership.id">
|
|
<label for="id" jhiTranslate="global.field.id">ID</label>
|
|
<input type="text" class="form-control" id="id" name="id"
|
|
[(ngModel)]="membership.id" readonly />
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.sinceDate" for="field_sinceDate">Since Date</label>
|
|
<div class="input-group">
|
|
<input id="field_sinceDate" type="text" class="form-control" name="sinceDate" ngbDatepicker #sinceDateDp="ngbDatepicker" [(ngModel)]="membership.sinceDate"
|
|
required/>
|
|
<span class="input-group-append">
|
|
<button type="button" class="btn btn-secondary" (click)="sinceDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
|
</span>
|
|
</div>
|
|
<div [hidden]="!(editForm.controls.sinceDate?.dirty && editForm.controls.sinceDate?.invalid)">
|
|
<small class="form-text text-danger"
|
|
[hidden]="!editForm.controls.sinceDate?.errors?.required" jhiTranslate="entity.validation.required">
|
|
This field is required.
|
|
</small>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.untilDate" for="field_untilDate">Until Date</label>
|
|
<div class="input-group">
|
|
<input id="field_untilDate" type="text" class="form-control" name="untilDate" ngbDatepicker #untilDateDp="ngbDatepicker" [(ngModel)]="membership.untilDate"
|
|
/>
|
|
<span class="input-group-append">
|
|
<button type="button" class="btn btn-secondary" (click)="untilDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.customer" for="field_customer">Customer</label>
|
|
<select class="form-control" id="field_customer" name="customer" [(ngModel)]="membership.customerId" >
|
|
<option [ngValue]="null"></option>
|
|
<option [ngValue]="customerOption.id" *ngFor="let customerOption of customers; trackBy: trackCustomerById">{{customerOption.prefix}}</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<button type="button" id="cancel-save" class="btn btn-secondary" (click)="previousState()">
|
|
<fa-icon [icon]="'ban'"></fa-icon> <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> <span jhiTranslate="entity.action.save">Save</span>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|