set "Add one more fieldset + " on en.json

fix visibiliti on Radio-Box Word-List And Multiplisiti Button on  Finalized Datasets-Profiles And Dataset-Editors
This commit is contained in:
Diamantis Tziotzios 2019-02-14 13:27:41 +02:00
parent 7756eb2a31
commit bbfd5e9812
4 changed files with 44 additions and 28 deletions

View File

@ -4,21 +4,25 @@
| translate}}</h5>
<mat-form-field class="col-12">
<input matInput type="string" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-PLACEHOLDER' | translate}}"
[formControl]="form.get('data').get('label')">
<input matInput type="string"
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-PLACEHOLDER' | translate}}"
[formControl]="form.get('data').get('label')">
</mat-form-field>
<div class="col-12">
<div *ngFor="let option of form.get('data').get('options')['controls'] index as i" class="row">
<mat-form-field class="col">
<input matInput type="string" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-LABEL' | translate}}"
[formControl]="this.form.get('data').get('options').get(''+i).get('label')">
<input matInput type="string"
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-LABEL' | translate}}"
[formControl]="this.form.get('data').get('options').get(''+i).get('label')">
</mat-form-field>
<mat-form-field class="col">
<input matInput type="string" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-VALUE' | translate}}"
[formControl]="this.form.get('data').get('options').get(''+i).get('value')">
<input matInput type="string"
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-RADIO-BOX-VALUE' | translate}}"
[formControl]="this.form.get('data').get('options').get(''+i).get('value')">
</mat-form-field>
<button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button">
<button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button"
[disabled]="this.form.disabled">
<mat-icon>delete</mat-icon>
</button>
</div>

View File

@ -4,21 +4,25 @@
| translate}}</h5>
<mat-form-field class="col-12">
<input matInput type="string" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-PLACEHOLDER' | translate}}"
[formControl]="form.get('data').get('label')">
<input matInput type="string"
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-PLACEHOLDER' | translate}}"
[formControl]="form.get('data').get('label')">
</mat-form-field>
<div class="col-12">
<div *ngFor="let option of form.get('data').get('options')['controls'] index as i" class="row">
<mat-form-field class="col">
<input matInput placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-LABEL' | translate}}"
type="text" [formControl]="form.get('data').get('options').get(''+i).get('label')">
<input matInput
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-LABEL' | translate}}"
type="text" [formControl]="form.get('data').get('options').get(''+i).get('label')">
</mat-form-field>
<mat-form-field class="col">
<input matInput placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-VALUE' | translate}}"
[formControl]="form.get('data').get('options').get(''+i).get('value')">
<input matInput
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-WORD-LIST-VALUE' | translate}}"
[formControl]="form.get('data').get('options').get(''+i).get('value')">
</mat-form-field>
<button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button">
<button mat-icon-button class="col-auto" (click)="deleteRow(i)" type="button"
[disabled]="this.form.disabled">
<mat-icon>delete</mat-icon>
</button>
</div>

View File

@ -9,33 +9,40 @@
<h3 *ngIf="form.get('description').value">{{form.get('description').value}}</h3>
</mat-panel-description>
</mat-expansion-panel-header>
<div *ngFor="let compositeFieldFormGroup of form.get('compositeFields')['controls']; let i = index;" class="col-12">
<div *ngFor="let compositeFieldFormGroup of form.get('compositeFields')['controls']; let i = index;"
class="col-12">
<!-- <div *ngIf="isElementVisible(compositeField)" class="row"> -->
<!-- *ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value)" -->
<div class="row" *ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value) && this.visibilityRulesService.scanIfChildsOfCompositeFieldHasVisibleItems(compositeFieldFormGroup)">
<div class="row"
*ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value) && this.visibilityRulesService.scanIfChildsOfCompositeFieldHasVisibleItems(compositeFieldFormGroup)">
<div *ngIf="(compositeFieldFormGroup.get('multiplicity').value.max - 1) > (compositeFieldFormGroup.get('multiplicityItems').length)"
class="col-12">
<button mat-button color="primary" (click)="addMultipleField(i)">
Add one more fieldset +
class="col-12">
<button mat-button color="primary" (click)="addMultipleField(i)"
[disabled]="compositeFieldFormGroup.disabled">
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.MULTIPLICITY-ADD-ONE-FIELD' | translate}}
</button>
</div>
<app-form-composite-field class="align-self-center col-12" [form]="compositeFieldFormGroup" [datasetProfileId]="datasetProfileId"
[isChild]="false"></app-form-composite-field>
<app-form-composite-field class="align-self-center col-12" [form]="compositeFieldFormGroup"
[datasetProfileId]="datasetProfileId" [isChild]="false"></app-form-composite-field>
<div *ngIf="compositeFieldFormGroup" class="col-12">
<div class="row">
<div class="col-12" *ngFor="let multipleCompositeFieldFormGroup of compositeFieldFormGroup.get('multiplicityItems')['controls']; let j = index">
<div class="col-12"
*ngFor="let multipleCompositeFieldFormGroup of compositeFieldFormGroup.get('multiplicityItems')['controls']; let j = index">
<div class="styleBorder row">
<app-form-composite-field class=" align-self-center col" [form]="multipleCompositeFieldFormGroup" [datasetProfileId]="datasetProfileId"
[isChild]="true"></app-form-composite-field>
<app-form-composite-field class=" align-self-center col"
[form]="multipleCompositeFieldFormGroup" [datasetProfileId]="datasetProfileId"
[isChild]="true"></app-form-composite-field>
<div class="col-auto align-self-center">
<button mat-icon-button type="button" class="deleteBtn" (click)="deleteMultipeFieldFromCompositeFormGroup(i,j);">
<button mat-icon-button type="button" class="deleteBtn"
(click)="deleteMultipeFieldFromCompositeFormGroup(i,j);">
<mat-icon>delete</mat-icon>
</button>
</div>
</div>
</div>
<mat-form-field *ngIf="compositeFieldFormGroup.get('hasCommentField').value" class="col-12" [formGroup]="compositeFieldFormGroup">
<mat-form-field *ngIf="compositeFieldFormGroup.get('hasCommentField').value" class="col-12"
[formGroup]="compositeFieldFormGroup">
<input matInput formControlName="commentFieldValue" placeholder="comment">
</mat-form-field>
<div class="col"></div>
@ -49,8 +56,8 @@
</div>
<div *ngIf="form.get('sections')" class="col-12">
<div *ngFor="let subSectionFormGroup of form.get('sections')['controls']; let j = index;" class="row">
<app-form-section class="col-12" [form]="subSectionFormGroup" [path]="path+'.'+(j+1)" [pathName]="pathName+'.sections.'+j"
[datasetProfileId]="datasetProfileId"></app-form-section>
<app-form-section class="col-12" [form]="subSectionFormGroup" [path]="path+'.'+(j+1)"
[pathName]="pathName+'.sections.'+j" [datasetProfileId]="datasetProfileId"></app-form-section>
</div>
</div>
</mat-expansion-panel>

View File

@ -95,6 +95,7 @@
"EXTENDED-DESCRIPTION": "Extended Description",
"MULTIPLICITY-MIN": "Multiplicity Min",
"MULTIPLICITY-MAX": "Multiplicity Max",
"MULTIPLICITY-ADD-ONE-FIELD": "Add one more fieldset +",
"ORDER": "Order"
},
"ACTIONS": {