Skip to content

Commit

Permalink
[User Account] Checkbox alignments
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Sep 24, 2024
1 parent 0413aaf commit 7c8b4d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions php/libraries/LorisForm.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1607,13 +1607,13 @@ class LorisForm
}
/// XXX: There seems to be a problem when using   to separate the
// checkbox from the label. Both Firefox and Chrome will still put a
// linebreak between the space and the checkbox. Instead, we wrap use
// linebreak between the space and the checkbox. Instead, we use
// CSS to wrap the tag which avoids the label from being separated from the
// checkbox. We don't wrap the whole label in it because if it's a long
// label it's still allowed to have linebreaks.
return "<span style=\"white-space: nowrap\"><input name=\"$el[name]\""
. " type=\"checkbox\" $checked $value "
. "$disabled $required/>"
return "<span style='white-space: nowrap;vertical-align: middle;'>"
. "<input name='$el[name]' type='checkbox' $checked $value "
. "$disabled $required style='vertical-align: baseline; margin-top: 0'/>"
. " </span>$el[label]";
}

Expand Down

0 comments on commit 7c8b4d5

Please sign in to comment.