75 lines
4.8 KiB
HTML
75 lines
4.8 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.from" for="field_from">From</label>
|
|
<div class="input-group">
|
|
<input id="field_from" type="text" class="form-control" name="from" ngbDatepicker #fromDp="ngbDatepicker" [(ngModel)]="membership.from"
|
|
required/>
|
|
<span class="input-group-append">
|
|
<button type="button" class="btn btn-secondary" (click)="fromDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
|
</span>
|
|
</div>
|
|
<div [hidden]="!(editForm.controls.from?.dirty && editForm.controls.from?.invalid)">
|
|
<small class="form-text text-danger"
|
|
[hidden]="!editForm.controls.from?.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.to" for="field_to">To</label>
|
|
<div class="input-group">
|
|
<input id="field_to" type="text" class="form-control" name="to" ngbDatepicker #toDp="ngbDatepicker" [(ngModel)]="membership.to"
|
|
/>
|
|
<span class="input-group-append">
|
|
<button type="button" class="btn btn-secondary" (click)="toDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-control-label" jhiTranslate="hsadminNgApp.membership.comment" for="field_comment">Comment</label>
|
|
<input type="text" class="form-control" name="comment" id="field_comment"
|
|
[(ngModel)]="membership.comment" maxlength="160"/>
|
|
<div [hidden]="!(editForm.controls.comment?.dirty && editForm.controls.comment?.invalid)">
|
|
<small class="form-text text-danger"
|
|
[hidden]="!editForm.controls.comment?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
|
|
This field cannot be longer than 160 characters.
|
|
</small>
|
|
</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" required>
|
|
<option *ngIf="!editForm.value.customer" [ngValue]="null" selected></option>
|
|
<option [ngValue]="customerOption.id" *ngFor="let customerOption of customers; trackBy: trackCustomerById">{{customerOption.prefix}}</option>
|
|
</select>
|
|
</div>
|
|
<div [hidden]="!(editForm.controls.customer?.dirty && editForm.controls.customer?.invalid)">
|
|
<small class="form-text text-danger"
|
|
[hidden]="!editForm.controls.customer?.errors?.required" jhiTranslate="entity.validation.required">
|
|
This field is required.
|
|
</small>
|
|
</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>
|