mirror of
https://github.com/moodle/moodle.git
synced 2025-07-18 21:01:27 +02:00
MDL-13766, added hidden elements to make label 'for' attribute happly
This commit is contained in:
@@ -152,6 +152,8 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element {
|
||||
$html .= $OUTPUT->file_manager($options);
|
||||
|
||||
$html .= '<input value="'.$draftitemid.'" name="'.$elname.'" type="hidden" />';
|
||||
// label element needs 'for' attribute work
|
||||
$html .= '<input value="" id="id_'.$elname.'" type="hidden" />';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
@@ -82,6 +82,8 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_input {
|
||||
$options = $fp->options;
|
||||
$str .= $OUTPUT->render($fp);
|
||||
$str .= '<input type="hidden" name="'.$elname.'" id="'.$id.'" value="'.$draftitemid.'" />';
|
||||
// label element needs 'for' attribute work
|
||||
$html .= '<input value="" id="id_'.$elname.'" type="hidden" />';
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user