Skip to content

Commit

Permalink
MDL-65217 core_form: use defined element id for filemanager.
Browse files Browse the repository at this point in the history
Removing unnamed input element (was introduced in ce47962), this has no
purpose apart of being label destination.
  • Loading branch information
kabalin authored and marinaglancy committed Apr 29, 2019
1 parent 0ceb675 commit 91a485a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/form/filemanager.php
Expand Up @@ -296,9 +296,7 @@ function toHtml() {
$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'));
Expand Down

0 comments on commit 91a485a

Please sign in to comment.