build: Use prettier for html
Stop ignoring html files in prettier and fix existing issues.
This commit is contained in:
@@ -1,14 +1,26 @@
|
||||
<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
|
||||
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>{{ 'labels.buttons.' + layout.cancelButtonText | translate }}</button>
|
||||
<button mat-raised-button color="primary" [mat-dialog-close]="{ data: form }" [disabled]="!form.valid || form.pristine">{{ 'labels.buttons.' + layout.addButtonText | translate }}</button>
|
||||
<button
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
[mat-dialog-close]="{ data: form }"
|
||||
[disabled]="!form.valid || form.pristine"
|
||||
>
|
||||
{{ 'labels.buttons.' + layout.addButtonText | translate }}
|
||||
</button>
|
||||
</mat-dialog-actions>
|
||||
|
||||
@@ -1,54 +1,76 @@
|
||||
<div [formGroup]="form" fxFlexFill>
|
||||
|
||||
<div *ngIf="formfield.controlType==='input' || formfield.controlType==='select'" fxFlexFill>
|
||||
|
||||
<div *ngIf="formfield.controlType === 'input' || formfield.controlType === 'select'" fxFlexFill>
|
||||
<mat-form-field fxFlexFill>
|
||||
|
||||
<mat-label>{{ formfield.label }}</mat-label>
|
||||
|
||||
<input *ngIf="formfield.controlType==='input'" [type]="formfield.type" matInput
|
||||
[formControlName]="formfield.controlName" [required]="formfield.required">
|
||||
<input
|
||||
*ngIf="formfield.controlType === 'input'"
|
||||
[type]="formfield.type"
|
||||
matInput
|
||||
[formControlName]="formfield.controlName"
|
||||
[required]="formfield.required"
|
||||
/>
|
||||
|
||||
<mat-select *ngIf="formfield.controlType==='select'" [formControlName]="formfield.controlName"
|
||||
[required]="formfield.required">
|
||||
<mat-select
|
||||
*ngIf="formfield.controlType === 'select'"
|
||||
[formControlName]="formfield.controlName"
|
||||
[required]="formfield.required"
|
||||
>
|
||||
<mat-option *ngFor="let option of formfield.options.data" [value]="option[formfield.options.value]">
|
||||
{{ option[formfield.options.label] }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
|
||||
<mat-error *ngIf="form.controls[formfield.controlName].hasError('required')">
|
||||
{{ formfield.label }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
|
||||
{{ formfield.label }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
<mat-form-field fxFlexFill *ngIf="formfield.controlType==='datepicker'" (click)="datePicker.open()">
|
||||
<mat-form-field fxFlexFill *ngIf="formfield.controlType === 'datepicker'" (click)="datePicker.open()">
|
||||
<mat-label>{{ formfield.label }}</mat-label>
|
||||
<input matInput [matDatepicker]="datePicker" [min]="formfield.minDate" [max]="formfield.maxDate"
|
||||
[formControlName]="formfield.controlName" [required]="formfield.required">
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="datePicker"
|
||||
[min]="formfield.minDate"
|
||||
[max]="formfield.maxDate"
|
||||
[formControlName]="formfield.controlName"
|
||||
[required]="formfield.required"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle>
|
||||
<mat-datepicker #datePicker></mat-datepicker>
|
||||
<mat-error *ngIf="form.controls[formfield.controlName].hasError('required')">
|
||||
{{ formfield.label }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
|
||||
{{ formfield.label }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlexFill *ngIf="formfield.controlType==='datetimepicker'" (click)="datePicker.open()">
|
||||
<mat-form-field fxFlexFill *ngIf="formfield.controlType === 'datetimepicker'" (click)="datePicker.open()">
|
||||
<mat-label>{{ formfield.label }}</mat-label>
|
||||
<input matInput [ngxMatDatetimePicker]="datetimePicker" [min]="formfield.minDate" [max]="formfield.maxDate"
|
||||
[formControlName]="formfield.controlName" [required]="formfield.required">
|
||||
<input
|
||||
matInput
|
||||
[ngxMatDatetimePicker]="datetimePicker"
|
||||
[min]="formfield.minDate"
|
||||
[max]="formfield.maxDate"
|
||||
[formControlName]="formfield.controlName"
|
||||
[required]="formfield.required"
|
||||
/>
|
||||
<mat-datepicker-toggle matSuffix [for]="datetimePicker"></mat-datepicker-toggle>
|
||||
<ngx-mat-datetime-picker #datetimePicker [enableMeridian]="true"></ngx-mat-datetime-picker>
|
||||
<mat-error *ngIf="form.controls[formfield.controlName].hasError('required')">
|
||||
{{ formfield.label }} {{'labels.commons.is' | translate }} <strong>{{'labels.commons.required' | translate }}</strong>
|
||||
{{ formfield.label }} {{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox *ngIf="formfield.controlType==='checkbox'" labelPosition="before" [checked]="formfield.value"
|
||||
[formControlName]="formfield.controlName" [required]="formfield.required">
|
||||
<mat-checkbox
|
||||
*ngIf="formfield.controlType === 'checkbox'"
|
||||
labelPosition="before"
|
||||
[checked]="formfield.value"
|
||||
[formControlName]="formfield.controlName"
|
||||
[required]="formfield.required"
|
||||
>
|
||||
{{ formfield.label }}
|
||||
</mat-checkbox>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user