mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-56705-master' of git://github.com/damyon/moodle
This commit is contained in:
commit
da55f3582b
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user