mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-20204 one more step away from html_select
This commit is contained in:
parent
c86a91d508
commit
2f0e96e447
8 changed files with 29 additions and 80 deletions
|
@ -80,16 +80,16 @@ class data_field_checkbox extends data_field_base {
|
|||
$checkbox = trim($checkbox);
|
||||
|
||||
if (in_array(addslashes($checkbox), $content)) {
|
||||
$str .= $OUTPUT->checkbox(html_select_option::make_checkbox(s($checkbox), true, $checkbox), 'f_'.$this->field->id.'[]');
|
||||
$str .= html_writer::checkbox('f_'.$this->field->id.'[]', s($checkbox), true, $checkbox);
|
||||
}
|
||||
$str .= $OUTPUT->checkbox(html_select_option::make_checkbox(s($checkbox), false, $checkbox), 'f_'.$this->field->id.'[]');
|
||||
$str .= html_writer::checkbox('f_'.$this->field->id.'[]', s($checkbox), false, $checkbox);
|
||||
$found = true;
|
||||
}
|
||||
if (!$found) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$str .= $OUTPUT->checkbox(html_select_option::make_checkbox(null, false, get_string('selectedrequired', 'data')), 'f_'.$this->field->id.'_allreq');
|
||||
$str .= html_writer::checkbox('f_'.$this->field->id.'_allreq', null, false, get_string('selectedrequired', 'data'));
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue