Skip to content

Commit

Permalink
MDL-74808 question: use the correct attr for checked checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
lameze committed Jul 8, 2022
1 parent a23f0bf commit 7c57a97
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion question/classes/bank/search/category_condition.php
Expand Up @@ -137,7 +137,7 @@ public function display_options_adv() {
global $PAGE;
$displaydata = [];
if ($this->recurse) {
$displaydata['checked'] = 'checked="true"';
$displaydata['checked'] = 'checked';
}
return $PAGE->get_renderer('core_question', 'bank')->render_category_condition_advanced($displaydata);
}
Expand Down
2 changes: 1 addition & 1 deletion question/classes/bank/search/hidden_condition.php
Expand Up @@ -69,7 +69,7 @@ public function display_options_adv() {
global $PAGE;
$displaydata = [];
if (!$this->hide) {
$displaydata['checked'] = 'checked="true"';
$displaydata['checked'] = 'checked';
}
return $PAGE->get_renderer('core_question', 'bank')->render_hidden_condition_advanced($displaydata);
}
Expand Down
2 changes: 1 addition & 1 deletion question/templates/showtext_checkbox.mustache
Expand Up @@ -28,6 +28,6 @@
}}
<div>
<input type="hidden" name="qbshowtext" value="0" id="qbshowtext_off">
<input id="qbshowtext_on" class="searchoptions mr-1" type="checkbox" value="1" name="qbshowtext" {{#checked}} checked="checked" {{/checked}}>
<input id="qbshowtext_on" class="searchoptions mr-1" type="checkbox" value="1" name="qbshowtext" {{#checked}} checked{{/checked}}>
<label for="qbshowtext_on">{{#str}} showquestiontext, question {{/str}}</label>
</div>

0 comments on commit 7c57a97

Please sign in to comment.