Skip to content

Commit

Permalink
Add select support to plugin configuration page - refs BT#9438
Browse files Browse the repository at this point in the history
  • Loading branch information
ilosada committed Mar 31, 2015
1 parent 48db796 commit 9c1e76c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions main/inc/lib/plugin.class.php
Expand Up @@ -180,6 +180,11 @@ public function get_settings_form()
}

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);

Expand Down Expand Up @@ -230,6 +235,14 @@ public function get_settings_form()
$element->_attributes['value'] = 'true';
$checkboxGroup[] = $element;
break;
case 'select':
$result->addElement(
$type,
$name,
array($this->get_lang($name), $help),
$options
);
break;
}
}

Expand Down

0 comments on commit 9c1e76c

Please sign in to comment.