Skip to content

Commit b7e2db3

Browse files
committed
Fix opt in position in checkbox editors
1 parent 7af4150 commit b7e2db3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/editors/checkbox.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ export class CheckboxEditor extends AbstractEditor {
3232
return Math.min(12, Math.max(this.getTitle().length / 7, 2))
3333
}
3434

35+
setOptInCheckbox () {
36+
super.setOptInCheckbox()
37+
38+
if (this.optInAppended) {
39+
this.container.insertBefore(this.optInContainer, this.container.firstChild)
40+
this.optInContainer.style.verticalAlign = 'top'
41+
this.control.style.marginTop = '0'
42+
}
43+
}
44+
3545
build () {
3646
if (!this.parent.options.table_row) {
3747
this.label = this.header = this.theme.getCheckboxLabel(this.getTitle(), this.isRequired())
@@ -45,6 +55,7 @@ export class CheckboxEditor extends AbstractEditor {
4555
this.input = this.theme.getCheckbox()
4656
this.input.id = this.formname
4757
this.control = this.theme.getFormControl(this.label, this.input, this.description, this.infoButton)
58+
this.control.style.display = 'inline-block'
4859

4960
if (this.schema.readOnly || this.schema.readonly) {
5061
this.disable(true)

0 commit comments

Comments
 (0)