From 91a485a040ec8a83efe7386cf6f63d28ec5834c4 Mon Sep 17 00:00:00 2001 From: Ruslan Kabalin Date: Sun, 7 Apr 2019 20:33:47 +0100 Subject: [PATCH] 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. --- lib/form/filemanager.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/form/filemanager.php b/lib/form/filemanager.php index af191a0e8d6..62670e5c2b8 100644 --- a/lib/form/filemanager.php +++ b/lib/form/filemanager.php @@ -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'));