feat: add form dialog component (#428)

- Add formfield, input, select base (model)
- Add formfield component
- Add form-group service
- Add form-dialog component

Fixes: #427
This commit is contained in:
Abhay Chawla
2019-12-01 23:20:51 +03:00
parent 6001446310
commit f616145a6b
14 changed files with 257 additions and 0 deletions
@@ -0,0 +1,14 @@
<h1 mat-dialog-title>{{ data.title }}</h1>
<div mat-dialog-content [formGroup]="form" [fxLayout]="layout.columns > 1 ? 'row wrap' : 'column'" fxLayout.lt-md="column" [fxLayoutGap]="(layout.columns > 1 ? layout.gap : 0) + '%'" fxLayoutGap.lt-md="0%">
<div *ngFor="let formfield of formfields" [fxFlex]="layout.flex + '%'" fxFlex.lt-md="100%">
<mifosx-formfield [formfield]="formfield" [form]="form" fxFlexFill></mifosx-formfield>
</div>
</div>
<mat-dialog-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button mat-dialog-close>{{ layout.cancelButtonText }}</button>
<button mat-raised-button color="primary" [mat-dialog-close]="{ data: form }" [disabled]="!form.valid && form.pristine">{{ layout.addButtonText }}</button>
</mat-dialog-actions>