Skip to content

Commit

Permalink
Fixed issue #17078: Checkbox layout not working
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 11, 2021
1 parent 38dd564 commit c1126f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/qanda_helper.php
Expand Up @@ -4213,7 +4213,7 @@ function do_array_multiflexi($ia)
$inputboxlayout = false;
$textAlignment = 'right';

if ($aQuestionAttributes['multiflexible_checkbox'] != 0) {
if ($aQuestionAttributes['multiflexible_checkbox'] === 'Y') {
$layout = "checkbox";
$minvalue = 0;
$maxvalue = 1;
Expand All @@ -4225,7 +4225,7 @@ function do_array_multiflexi($ia)
$textAlignment = 'center';
App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts') . "array-number-checkbox.js", CClientScript::POS_BEGIN);
App()->getClientScript()->registerScript("doArrayNumberCheckbox", "doArrayNumberCheckbox();\n", LSYii_ClientScript::POS_POSTSCRIPT);
} elseif ($aQuestionAttributes['input_boxes'] != 0) {
} elseif ($aQuestionAttributes['input_boxes'] === 'Y') {
$layout = "text";
$inputboxlayout = true;
$answertypeclass .= " numeric-item text-item";
Expand Down

3 comments on commit c1126f2

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broke with imported survey …

Pleasde : really fix the switch  … a swicth must set a boolean …not a Y/N …

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olleharstedt
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted.

Please sign in to comment.