|
@@ -5,30 +5,41 @@
|
|
|
|
|
|
<!-- Default template for form field
|
|
<!-- Default template for form field
|
|
used when a TemplateRef is NOT supplied to component -->
|
|
used when a TemplateRef is NOT supplied to component -->
|
|
-<ng-template #default let-control="control" let-meta="meta">
|
|
|
|
|
|
+<ng-template let-control="control" let-meta="meta" #default>
|
|
<ng-container *ngIf="meta.type !== 'Hidden'">
|
|
<ng-container *ngIf="meta.type !== 'Hidden'">
|
|
|
|
|
|
<ng-container *ngIf="!meta.noLabel; else fullWidth">
|
|
<ng-container *ngIf="!meta.noLabel; else fullWidth">
|
|
|
|
|
|
- <div class="form-group row" *ngIf="meta.type !== 'Container'; else recursiveDynaform" [ngClass]="getRowClass(control, meta)">
|
|
|
|
- <label class="col-sm-4" [ngClass]="meta.class" [for]="meta.name" title="">
|
|
|
|
- {{ meta.rowLabel !== mull ? meta.rowLabel : meta.label }}
|
|
|
|
- <span *ngIf="control && control.touched && control.invalid" class="fas fa-exclamation-triangle"
|
|
|
|
- [ngbTooltip]="getValidationFailureMessage(control, meta)"
|
|
|
|
- ></span>
|
|
|
|
- </label>
|
|
|
|
- <div class="col-sm-8">
|
|
|
|
- <ng-container dynafield [control]="control" [meta]="meta" (call)="handleCallback($event)"></ng-container>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <ng-template #recursiveDynaform>
|
|
|
|
|
|
+ <ng-template *ngIf="isContainer(meta)">
|
|
<div *ngIf="meta.label" class="row">
|
|
<div *ngIf="meta.label" class="row">
|
|
<h3 class="col-sm-12 h-dyna" [ngClass]="'h-dyna-' + (path.length + 2)">{{ meta.label }}</h3>
|
|
<h3 class="col-sm-12 h-dyna" [ngClass]="'h-dyna-' + (path.length + 2)">{{ meta.label }}</h3>
|
|
</div>
|
|
</div>
|
|
<app-dynaform [formGroup]="control" [meta]="meta.meta" [template]="template" (call)="handleCallback($event)"></app-dynaform>
|
|
<app-dynaform [formGroup]="control" [meta]="meta.meta" [template]="template" (call)="handleCallback($event)"></app-dynaform>
|
|
</ng-template>
|
|
</ng-template>
|
|
|
|
|
|
|
|
+ <ng-template *ngIf="isRepeatingContainer(meta)">
|
|
|
|
+ <div *ngFor="let group of meta.meta">
|
|
|
|
+ <div *ngIf="group.label" class="row">
|
|
|
|
+ <h3 class="col-sm-12 h-dyna" [ngClass]="'h-dyna-' + (path.length + 2)">{{ meta.label }}</h3>
|
|
|
|
+ </div>
|
|
|
|
+ <app-dynaform [formGroup]="control" [meta]="group.meta" [template]="template" (call)="handleCallback($event)"></app-dynaform>
|
|
|
|
+ </div>
|
|
|
|
+ </ng-template>
|
|
|
|
+
|
|
|
|
+ <ng-template *ngIf="isField(meta)">
|
|
|
|
+ <div class="form-group row" [ngClass]="getRowClass(control, meta)">
|
|
|
|
+ <label class="col-sm-4" [ngClass]="meta.class" [for]="meta.name" title="">
|
|
|
|
+ {{ meta.rowLabel !== null ? meta.rowLabel : meta.label }}
|
|
|
|
+ <span *ngIf="control && control.touched && control.invalid" class="fas fa-exclamation-triangle"
|
|
|
|
+ [ngbTooltip]="getValidationFailureMessage(control, meta)"
|
|
|
|
+ ></span>
|
|
|
|
+ </label>
|
|
|
|
+ <div class="col-sm-8">
|
|
|
|
+ <ng-container dynafield [control]="control" [meta]="meta" (call)="handleCallback($event)"></ng-container>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </ng-template>
|
|
|
|
+
|
|
</ng-container>
|
|
</ng-container>
|
|
|
|
|
|
<ng-template #fullWidth>
|
|
<ng-template #fullWidth>
|