Files
cbsnexora/src/app/loans/loans-view/loan-account-actions/add-collateral/add-collateral.component.html
T
2020-07-22 20:32:55 +05:30

45 lines
1.5 KiB
HTML

<div class="container">
<form [formGroup]="collateralForm" (ngSubmit)="submit()">
<mat-card-content>
<div fxLayout="column">
<mat-form-field>
<mat-label>Collateral Type</mat-label>
<mat-select required formControlName="collateralTypeId">
<mat-option *ngFor="let collateral of dataObject.allowedCollateralTypes" [value]="collateral.id"> {{ collateral.name }}</mat-option>
</mat-select>
<mat-error *ngIf="collateralForm.controls.collateralTypeId.hasError('required')">
Collateral type <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>Value</mat-label>
<input matInput required formControlName="value">
<mat-error *ngIf="collateralForm.controls.value.hasError('required')">
Value is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>Description</mat-label>
<textarea matInput formControlName="description"></textarea>
</mat-form-field>
</div>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
<button mat-raised-button color="primary" [disabled]="!collateralForm.valid" *mifosxHasPermission="'CREATE_COLLATERAL'">Submit</button>
</mat-card-actions>
</mat-card-content>
</form>
</div>