From 9c1e76cde9955acd68939e6650e4b62d1db2b0bd Mon Sep 17 00:00:00 2001 From: Imanol Losada Date: Tue, 31 Mar 2015 17:37:04 -0500 Subject: [PATCH] Add select support to plugin configuration page - refs BT#9438 --- main/inc/lib/plugin.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/main/inc/lib/plugin.class.php b/main/inc/lib/plugin.class.php index 3bd14ac4dc..05e0d14957 100755 --- a/main/inc/lib/plugin.class.php +++ b/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; } }