MDL-65217 core_form: use defined element id for filemanager.

Removing unnamed input element (was introduced in ce47962), this has no
purpose apart of being label destination.
This commit is contained in:
Ruslan Kabalin 2019-04-07 20:33:47 +01:00 committed by Marina Glancy
parent 0ceb6751aa
commit 91a485a040

View File

@ -296,9 +296,7 @@ class MoodleQuickForm_filemanager extends HTML_QuickForm_element implements temp
$output = $PAGE->get_renderer('core', 'files');
$html .= $output->render($fm);
$html .= html_writer::empty_tag('input', array('value' => $draftitemid, 'name' => $elname, 'type' => 'hidden'));
// label element needs 'for' attribute work
$html .= html_writer::empty_tag('input', array('value' => '', 'id' => 'id_'.$elname, 'type' => 'hidden'));
$html .= html_writer::empty_tag('input', array('value' => $draftitemid, 'name' => $elname, 'type' => 'hidden', 'id' => $id));
if (!empty($options->accepted_types) && $options->accepted_types != '*') {
$html .= html_writer::tag('p', get_string('filesofthesetypes', 'form'));