Skip to content

Commit

Permalink
Fixed alignment of checkbox questions with lengthy labels (QA-6739)
Browse files Browse the repository at this point in the history
  • Loading branch information
orangejenny committed Jun 26, 2024
1 parent 4bcfa60 commit 44359d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ hqDefine("cloudcare/js/form_entry/entries", [
self.xformParams = function () { return {}; };
self.placeholderText = '';
self.broadcastTopics = [];
self.colStyleIfHideLabel = ko.observable(null);
// Returns true if the rawAnswer is valid, false otherwise
self.isValid = function (rawAnswer) {
return self.getErrorMessage(rawAnswer) === null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<fieldset>
<legend class="sr-only" data-bind="text: question.caption()"></legend>
<div class="sel clear">
<div data-bind="foreach: choices, as: 'choice', css: {row: $data.colStyleIfHideLabel}">
<div data-bind="css: { checkbox: $parent.isMulti, radio: !$parent.isMulti, 'form-check': !$parent.colStyleIfHideLabel}, class: $parent.colStyleIfHideLabel">
<div data-bind="foreach: choices, as: 'choice', css: {row: $data.colStyleIfHideLabel()}">
<div data-bind="css: {'form-check': !$parent.colStyleIfHideLabel()}, class: $parent.colStyleIfHideLabel()">
<input data-bind="
checked: $parent.rawAnswer,
checkedValue: $data,
Expand Down

0 comments on commit 44359d3

Please sign in to comment.