mirror of
https://github.com/moodle/moodle.git
synced 2025-04-17 22:45:54 +02:00
Merge branch 'MDL-30940-master' of git://github.com/FMCorz/moodle
This commit is contained in:
commit
ea03f1149e
@ -71,13 +71,19 @@ class MoodleQuickForm_select extends HTML_QuickForm_select{
|
||||
* @return string
|
||||
*/
|
||||
function toHtml(){
|
||||
$html = '';
|
||||
if ($this->getMultiple()) {
|
||||
// Adding an hidden field forces the browser to send an empty data even though the user did not
|
||||
// select any element. This value will be cleaned up in self::exportValue() as it will not be part
|
||||
// of the select options.
|
||||
$html .= '<input type="hidden" name="'.$this->getName().'" value="_qf__force_multiselect_submission">';
|
||||
}
|
||||
if ($this->_hiddenLabel){
|
||||
$this->_generateId();
|
||||
return '<label class="accesshide" for="'.$this->getAttribute('id').'" >'.
|
||||
$this->getLabel().'</label>'.parent::toHtml();
|
||||
} else {
|
||||
return parent::toHtml();
|
||||
$html .= '<label class="accesshide" for="'.$this->getAttribute('id').'" >'.$this->getLabel().'</label>';
|
||||
}
|
||||
$html .= parent::toHtml();
|
||||
return $html;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user