Add select support to plugin configuration page - refs BT#9438

1.10.x
Imanol Losada 11 years ago
parent 48db79691b
commit 9c1e76cde9
  1. 13
      main/inc/lib/plugin.class.php

@ -180,6 +180,11 @@ class Plugin
}
foreach ($this->fields as $name => $type) {
$options = null;
if (is_array($type) && isset($type['type']) && $type['type'] === "select") {
$options = $type['options'];
$type = $type['type'];
}
$value = $this->get($name);
@ -230,6 +235,14 @@ class Plugin
$element->_attributes['value'] = 'true';
$checkboxGroup[] = $element;
break;
case 'select':
$result->addElement(
$type,
$name,
array($this->get_lang($name), $help),
$options
);
break;
}
}

Loading…
Cancel
Save