Skip to content

Commit 6212e3f

Browse files
author
Joran De Braekeleer
committed
Merge branch 'w2p-127705_cleanup-input-form-spacing' into w2p-127705_cleanup-input-form-spacing_contribute-main
2 parents 27e9e61 + 17d7912 commit 6212e3f

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<div [class.mb-3]="(model.type !== 'GROUP' && asBootstrapFormGroup) || getClass('element', 'container').includes('mb-3')"
2-
[class.d-none]="model.hidden"
1+
<div [class.mb-2]="hasLabel || model.type === 'DATE' || (model.type !== 'GROUP' && asBootstrapFormGroup) || getClass('element', 'container').includes('mb-2')"
2+
[class.d-none]="model.hidden"
33
[formGroup]="group"
44
[ngClass]="[getClass('element', 'container'), getClass('grid', 'container')]">
55
@if (!isCheckbox && hasLabel) {
@@ -24,8 +24,7 @@
2424
class="text-muted ds-hint" [innerHTML]="model.hint | translate" [ngClass]="getClass('element', 'hint')"></small>
2525
}
2626
<!-- In case of repeatable fields show empty space for all elements except the first -->
27-
@if (context?.index !== null
28-
&& (!showErrorMessages || errorMessages.length === 0)) {
27+
@if (context?.parent?.groups?.length > 1 && (!showErrorMessages || errorMessages.length === 0)) {
2928
<div class="clearfix w-100 mb-2"></div>
3029
}
3130

@@ -99,7 +98,9 @@
9998
<small
10099
class="text-muted ds-hint" [innerHTML]="model.hint | translate" [ngClass]="getClass('element', 'hint')"></small>
101100
}
102-
<div class="clearfix w-100 mb-2"></div>
101+
@if (context?.parent?.groups?.length > 1 && (!showErrorMessages || errorMessages.length === 0)) {
102+
<div class="clearfix w-100 mb-2"></div>
103+
}
103104
}
104105
<ng-content></ng-content>
105106
</div>

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
appearance: none;
1616
}
1717

18-
1918
:host ::ng-deep .btn-group-toggle > .btn input[type="radio"] {
2019
position: absolute;
2120
clip: rect(0,0,0,0);
@@ -33,3 +32,13 @@
3332
:host ::ng-deep .custom-control-input.is-invalid ~ .custom-control-label {
3433
color: var(--bs-form-invalid-color);
3534
}
35+
36+
.invalid-feedback {
37+
margin-top: 0;
38+
}
39+
40+
.col-form-label {
41+
padding-top: 0;
42+
padding-bottom: 0;
43+
margin-bottom: 0.5rem;
44+
}

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="me-auto text-contents">
2+
<span class="me-auto text-contents align-self-center">
33
@if ((metadataRepresentation$ | async) === undefined) {
44
<ds-loading [showMessage]="false"></ds-loading>
55
}

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,6 +4,7 @@
44

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

89
/* Changed from Bootstrap 5's legend to ensure that the date issues label is on a different line as it's input */
910
float: none;

0 commit comments

Comments
 (0)