Merge branch 'MDL-56705-master' of git://github.com/damyon/moodle

This commit is contained in:
Dan Poltawski 2016-11-10 08:03:37 +00:00
commit da55f3582b
2 changed files with 5 additions and 4 deletions

View File

@ -224,10 +224,6 @@ class MoodleQuickForm_select extends HTML_QuickForm_select implements templatabl
}
$context['options'] = $options;
if ($this->getAttribute('multiple')) {
$context['name'] = $context['name'] . '[]';
}
return $context;
}
}

View File

@ -82,6 +82,11 @@ trait templatable_form_element {
$context['type'] = $this->getType();
$context['attributes'] = implode(' ', $otherattributes);
// Elements with multiple values need array syntax.
if ($this->getAttribute('multiple')) {
$context['name'] = $context['name'] . '[]';
}
return $context;
}
}