Restyles and repositions "Add one more Fieldset" button.

This commit is contained in:
Diamantis Tziotzios 2019-03-14 12:58:24 +02:00
parent b7e0618945
commit 2cbaa05f95
3 changed files with 13 additions and 7 deletions

View File

@ -14,14 +14,10 @@
<!-- *ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value)" -->
<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)" [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>
<div *ngIf="compositeFieldFormGroup" class="col-12">
<div class="row">
<div class="col-12" *ngFor="let multipleCompositeFieldFormGroup of compositeFieldFormGroup.get('multiplicityItems')['controls']; let j = index">
@ -35,6 +31,12 @@
</div>
</div>
</div>
<div *ngIf="(compositeFieldFormGroup.get('multiplicity').value.max - 1) > (compositeFieldFormGroup.get('multiplicityItems').length)"
class="col-12 && addOneFieldButton">
<button mat-icon-button color="primary" (click)="addMultipleField(i)" [disabled]="compositeFieldFormGroup.disabled" matTooltip="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.MULTIPLICITY-ADD-ONE-FIELD' | translate}}">
<mat-icon>add_circle</mat-icon>
</button>
</div>
<mat-form-field *ngIf="compositeFieldFormGroup.get('hasCommentField').value" class="col-12" [formGroup]="compositeFieldFormGroup">
<input matInput formControlName="commentFieldValue" placeholder="comment">
</mat-form-field>

View File

@ -2,6 +2,9 @@
.expansion-panel {
margin-bottom: 1em;
}
.addOneFieldButton {
margin-top: -15px;
}
}
.styleBorder{
border: 0.2em solid lightgray;
@ -12,3 +15,4 @@
padding-bottom: 18px;
color: black;
}

View File

@ -98,7 +98,7 @@
"ADDITIONAL-INFORMATION":"Additional Information",
"MULTIPLICITY-MIN": "Multiplicity Min",
"MULTIPLICITY-MAX": "Multiplicity Max",
"MULTIPLICITY-ADD-ONE-FIELD": "Add one more fieldset +",
"MULTIPLICITY-ADD-ONE-FIELD": "Add one more fieldset",
"ORDER": "Order"
},
"ACTIONS": {