Files
cbsnexora/src/app/shared/form-dialog/form-dialog.component.html
T
2026-03-20 23:46:44 +05:30

49 lines
1.5 KiB
HTML

<!--
Copyright since 2025 Mifos Initiative
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="fd-dialog">
<div class="fd-header">
<h1 mat-dialog-title class="fd-title">{{ data.title }}</h1>
<button mat-icon-button mat-dialog-close class="fd-close" aria-label="Close">
<i class="fa fa-times"></i>
</button>
</div>
<div
mat-dialog-content
class="fd-content"
[formGroup]="form"
[ngClass]="[
layout.columns > 1 ? 'fd-grid fd-grid--cols-' + layout.columns : 'fd-grid fd-grid--single',
'responsive-column'
]"
>
@for (formfield of formfields; track formfield) {
<div class="fd-field" [ngClass]="layout.columns > 1 ? 'fd-field--multi' : ''">
<mifosx-formfield [formfield]="formfield" [form]="form" class="flex-fill"></mifosx-formfield>
</div>
}
</div>
<mat-dialog-actions class="fd-actions" align="end">
<button mat-stroked-button mat-dialog-close class="fd-btn fd-btn--cancel">
{{ 'labels.buttons.' + layout.cancelButtonText | translate }}
</button>
<button
mat-flat-button
color="primary"
[mat-dialog-close]="{ data: form }"
[disabled]="!form.valid || form.pristine"
class="fd-btn fd-btn--submit"
>
<i class="fa fa-check fd-btn__icon"></i>
{{ 'labels.buttons.' + layout.addButtonText | translate }}
</button>
</mat-dialog-actions>
</div>