Skip to content

Commit 46a8953

Browse files
author
Joran De Braekeleer
committed
127705: Update dynamic list to bootstrap 5
1 parent b00f489 commit 46a8953

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
@for (columnItems of items; track columnItems) {
1010
<div class="col-sm">
1111
@for (item of columnItems; track item) {
12-
<div class="custom-control custom-checkbox">
13-
<input type="checkbox" class="custom-control-input"
12+
<div class="form-check">
13+
<input type="checkbox" class="form-check-input"
1414
[attr.aria-labelledby]="'label_' + model.id"
1515
[attr.tabindex]="item.index"
1616
[checked]="item.value"
@@ -21,7 +21,7 @@
2121
(blur)="onBlur($event)"
2222
(change)="onChange($event)"
2323
(focus)="onFocus($event)"/>
24-
<label class="custom-control-label"
24+
<label class="form-check-label"
2525
[class.disabled]="model.disabled"
2626
[ngClass]="model.layout.element?.control"
2727
[for]="item.id">
@@ -45,16 +45,16 @@
4545
@for (columnItems of items; track columnItems) {
4646
<div class="col-sm">
4747
@for (item of columnItems; track item) {
48-
<div class="custom-control custom-radio">
49-
<input type="radio" class="custom-control-input"
48+
<div class="form-check">
49+
<input type="radio" class="form-check-input"
5050
[checked]="item.value"
5151
[id]="item.id"
5252
[name]="model.id"
5353
[required]="model.required"
5454
[value]="item.index"
5555
(blur)="onBlur($event)"
5656
(focus)="onFocus($event)"/>
57-
<label class="custom-control-label"
57+
<label class="form-check-label"
5858
[class.disabled]="model.disabled"
5959
[ngClass]="model.layout.element?.control"
6060
[for]="item.id">

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ describe('DsDynamicListComponent test suite', () => {
179179
});
180180

181181
it('should set model value properly when a checkbox option is selected', () => {
182-
const de = listFixture.debugElement.queryAll(By.css('div.custom-checkbox'));
183-
const items = de[0].queryAll(By.css('input.custom-control-input'));
182+
const de = listFixture.debugElement.queryAll(By.css('div.form-check'));
183+
const items = de[0].queryAll(By.css('input.form-check-input'));
184184
const item = items[0];
185185
modelValue = [Object.assign(new VocabularyEntry(), { authority: 1, display: 'one', value: 1 })];
186186

@@ -229,8 +229,8 @@ describe('DsDynamicListComponent test suite', () => {
229229
});
230230

231231
it('should set model value properly when a checkbox option is deselected', () => {
232-
const de = listFixture.debugElement.queryAll(By.css('div.custom-checkbox'));
233-
const items = de[0].queryAll(By.css('input.custom-control-input'));
232+
const de = listFixture.debugElement.queryAll(By.css('div.form-check'));
233+
const items = de[0].queryAll(By.css('input.form-check-input'));
234234
const item = items[0];
235235
modelValue = [];
236236

@@ -267,8 +267,8 @@ describe('DsDynamicListComponent test suite', () => {
267267
});
268268

269269
it('should set model value when a radio option is selected', () => {
270-
const de = listFixture.debugElement.queryAll(By.css('div.custom-radio'));
271-
const items = de[0].queryAll(By.css('input.custom-control-input'));
270+
const de = listFixture.debugElement.queryAll(By.css('div.form-check'));
271+
const items = de[0].queryAll(By.css('input.form-check-input'));
272272
const item = items[0];
273273
modelValue = Object.assign(new VocabularyEntry(), { authority: 1, display: 'one', value: 1 });
274274

0 commit comments

Comments
 (0)