'style' => $image->style,
'title' => $image->title,
'id' => $image->id);
-
+
if (!empty($image->height) || !empty($image->width)) {
$attributes['style'] .= $this->prepare_legacy_width_and_height($image);
}
}
$option->prepare();
- $option->generate_id();
+
$option->label->for = $option->id;
$this->prepare_event_handlers($option);
if (empty($this->id)) {
$this->id = 'menu' . str_replace(array('[', ']'), '', $this->name);
}
+
if (empty($this->classes)) {
$this->set_classes(array('menu' . str_replace(array('[', ']'), '', $this->name)));
}
+
if (is_null($this->nothinglabel)) {
$this->nothinglabel = get_string('choosedots');
}
foreach ($options as $value => $display) {
if ($display == '--') { /// we are ending previous optgroup
- $this->options[] = $optgroup;
+ // $this->options[] = $optgroup;
$inoptgroup = false;
continue;
} else if (substr($display,0,2) == '--') { /// we are starting a new optgroup
$option->value = s($value);
- if (!empty($optionsextra[$value])) {
- $optstr .= ' '.$optionsextra[$value];
- }
-
if ($inoptgroup) {
$optgroup->options[] = $option;
} else {