argos/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section.component.html

44 lines
2.1 KiB
HTML
Raw Normal View History

2018-11-29 13:26:18 +01:00
<div class="dynamic-form-section row">
<mat-accordion class="col-12">
<mat-expansion-panel class="row expansion-panel" expanded=true>
<mat-expansion-panel-header>
<mat-panel-title>
2018-11-29 13:26:18 +01:00
<h6>{{section.numbering}} {{section.title}}</h6>
</mat-panel-title>
<mat-panel-description>
<h3 *ngIf="section.description">{{section.description}}</h3>
<!-- <h4 *ngIf="section.extendedDescription">{{section.extendedDescription}}</h4> -->
</mat-panel-description>
</mat-expansion-panel-header>
2018-01-11 17:14:23 +01:00
2018-11-29 13:26:18 +01:00
<div *ngFor="let compositeField of section.compositeFields; let i = index; trackBy: trackByFn" class="col-12">
<div *ngIf="isElementVisible(compositeField)" class="row">
<div *ngIf="(compositeField?.multiplicity?.max - 1) > (compositeField?.multiplicityItems?.length)" class="col-12">
<button mat-button color="primary" (click)="addMultipleField(i)">
Add one more fieldset +
2018-11-29 13:26:18 +01:00
</button>
</div>
2019-01-18 18:03:45 +01:00
<app-form-composite-field class="col-12" [compositeField]="compositeField"></app-form-composite-field>
2018-11-29 13:26:18 +01:00
<div *ngIf="compositeField" class="col-12">
<div class="row">
2019-01-18 18:03:45 +01:00
<app-form-composite-field class="col-12" *ngFor="let multipleCompositeField of compositeField.multiplicityItems; let j = index; trackBy: trackByFn" [compositeField]="multipleCompositeField"></app-form-composite-field>
2018-11-29 13:26:18 +01:00
<mat-form-field *ngIf="compositeField.hasCommentField" class="col-12" [formGroup]="form.get('compositeFields').get(''+i)">
<input matInput formControlName="commentFieldValue" placeholder="comment">
</mat-form-field>
2018-11-29 13:26:18 +01:00
<div class="col"></div>
<button class="col-auto" mat-icon-button type="button" (click)="next(compositeField)">
<mat-icon>expand_more</mat-icon>
</button>
</div>
</div>
</div>
</div>
2018-11-29 13:26:18 +01:00
<div *ngIf="section?.sections" class="col-12">
<div *ngFor="let itemsection of section.sections; let j = index;" class="row">
2019-01-18 18:03:45 +01:00
<app-form-section class="col-12" [section]="itemsection" [path]="path+'.'+(j+1)" [pathName]="pathName+'.sections.'+j"></app-form-section>
</div>
</div>
</mat-expansion-panel>
</mat-accordion>
2018-09-06 14:50:38 +02:00
</div>