Skip to content

Commit 17d7912

Browse files
Joran De Braekeleeralexandrevryghem
authored andcommitted
127705: Cleanup input form spacing
1 parent 404ccd9 commit 17d7912

File tree

5 files changed

+15
-6
lines changed

5 files changed

+15
-6
lines changed

src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<div [class.form-group]="(model.type !== 'GROUP' && asBootstrapFormGroup) || getClass('element', 'container').includes('form-group')"
22
[class.d-none]="model.hidden"
3+
[class.mb-2]="hasLabel || model.type === 'DATE'"
34
[formGroup]="group"
45
[ngClass]="[getClass('element', 'container'), getClass('grid', 'container')]">
56
<label *ngIf="!isCheckbox && hasLabel"
@@ -19,8 +20,7 @@
1920
<small *ngIf="hasHint && (formBuilderService.hasArrayGroupValue(model) || (!model.repeatable && (isRelationship === false || value?.value === null)) || (model.repeatable === true && context?.index === context?.context?.groups?.length - 1)) && (!showErrorMessages || errorMessages.length === 0)"
2021
class="text-muted ds-hint" [innerHTML]="model.hint | translate" [ngClass]="getClass('element', 'hint')"></small>
2122
<!-- In case of repeatable fields show empty space for all elements except the first -->
22-
<div *ngIf="context?.index !== null
23-
&& (!showErrorMessages || errorMessages.length === 0)" class="clearfix w-100 mb-2"></div>
23+
<div *ngIf="context?.parent?.groups?.length > 1 && (!showErrorMessages || errorMessages.length === 0)" class="clearfix w-100 mb-2"></div>
2424

2525
<div *ngIf="!model.hideErrorMessages && showErrorMessages" [id]="id + '_errors'"
2626
[ngClass]="[getClass('element', 'errors'), getClass('grid', 'errors')]">
@@ -76,7 +76,7 @@
7676
</ds-existing-relation-list-element>
7777
<small *ngIf="hasHint && (model.repeatable === false || context?.index === context?.context?.groups?.length - 1) && (!showErrorMessages || errorMessages.length === 0)"
7878
class="text-muted ds-hint" [innerHTML]="model.hint | translate" [ngClass]="getClass('element', 'hint')"></small>
79-
<div class="clearfix w-100 mb-2"></div>
79+
<div *ngIf="context?.parent?.groups?.length > 1 && (!showErrorMessages || errorMessages.length === 0)" class="clearfix w-100 mb-2"></div>
8080
</ng-container>
8181
<ng-content></ng-content>
8282
</div>

src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,13 @@
1414
-moz-appearance: none;
1515
appearance: none;
1616
}
17+
18+
.invalid-feedback {
19+
margin-top: 0;
20+
}
21+
22+
.col-form-label {
23+
padding-top: 0;
24+
padding-bottom: 0;
25+
margin-bottom: 0.5rem;
26+
}

src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="d-flex">
2-
<span class="mr-auto text-contents">
2+
<span class="mr-auto text-contents align-self-center">
33
<ng-container *ngIf="!(metadataRepresentation$ | async)">
44
<ds-themed-loading [showMessage]="false"></ds-themed-loading>
55
</ng-container>

src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44

55
legend {
66
font-size: initial;
7+
margin-bottom: 0;
78
}

src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
<span [ngClass]="model.layout.element?.label" [innerHTML]="item.label"></span>
2929
</label>
3030
</div>
31-
<br>
3231
</div>
3332

3433
</div>
@@ -60,7 +59,6 @@
6059
<span [ngClass]="model.layout.element?.label" [innerHTML]="item.label"></span>
6160
</label>
6261
</div>
63-
<br>
6462
</div>
6563

6664
</div>

0 commit comments

Comments
 (0)