91 lines
		
	
	
		
			6.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			91 lines
		
	
	
		
			6.1 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.documentDate" for="field_documentDate">Document Date</label>
 | 
						|
                    <div class="input-group">
 | 
						|
                        <input id="field_documentDate" type="text" class="form-control" name="documentDate" ngbDatepicker  #documentDateDp="ngbDatepicker" [(ngModel)]="membership.documentDate"
 | 
						|
                        required/>
 | 
						|
                        <span class="input-group-append">
 | 
						|
                            <button type="button" class="btn btn-secondary" (click)="documentDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
 | 
						|
                        </span>
 | 
						|
                    </div>
 | 
						|
                    <div [hidden]="!(editForm.controls.documentDate?.dirty && editForm.controls.documentDate?.invalid)">
 | 
						|
                        <small class="form-text text-danger"
 | 
						|
                        [hidden]="!editForm.controls.documentDate?.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.memberFrom" for="field_memberFrom">Member From</label>
 | 
						|
                    <div class="input-group">
 | 
						|
                        <input id="field_memberFrom" type="text" class="form-control" name="memberFrom" ngbDatepicker  #memberFromDp="ngbDatepicker" [(ngModel)]="membership.memberFrom"
 | 
						|
                        required/>
 | 
						|
                        <span class="input-group-append">
 | 
						|
                            <button type="button" class="btn btn-secondary" (click)="memberFromDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
 | 
						|
                        </span>
 | 
						|
                    </div>
 | 
						|
                    <div [hidden]="!(editForm.controls.memberFrom?.dirty && editForm.controls.memberFrom?.invalid)">
 | 
						|
                        <small class="form-text text-danger"
 | 
						|
                        [hidden]="!editForm.controls.memberFrom?.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.memberUntil" for="field_memberUntil">Member Until</label>
 | 
						|
                    <div class="input-group">
 | 
						|
                        <input id="field_memberUntil" type="text" class="form-control" name="memberUntil" ngbDatepicker  #memberUntilDp="ngbDatepicker" [(ngModel)]="membership.memberUntil"
 | 
						|
                        />
 | 
						|
                        <span class="input-group-append">
 | 
						|
                            <button type="button" class="btn btn-secondary" (click)="memberUntilDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
 | 
						|
                        </span>
 | 
						|
                    </div>
 | 
						|
                </div>
 | 
						|
                <div class="form-group">
 | 
						|
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.membership.remark" for="field_remark">Remark</label>
 | 
						|
                    <input type="text" class="form-control" name="remark" id="field_remark"
 | 
						|
                        [(ngModel)]="membership.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 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>
 |