aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/sidebar/SelectWidget.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/classes/sidebar/SelectWidget.php')
-rw-r--r--lib/classes/sidebar/SelectWidget.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/classes/sidebar/SelectWidget.php b/lib/classes/sidebar/SelectWidget.php
index ce311f6..7397175 100644
--- a/lib/classes/sidebar/SelectWidget.php
+++ b/lib/classes/sidebar/SelectWidget.php
@@ -19,15 +19,15 @@ class SelectWidget extends SidebarWidget
*/
public function __construct($title, $url, $name, $method = 'get', $multiple = false)
{
+ parent::__construct();
$this->template = 'sidebar/select-widget';
-
$this->setTitle($title);
$this->setUrl($url);
$this->setSelectParameterName($name);
$this->setRequestMethod($method);
$this->setMultiple($multiple);
-
$this->template_variables['max_length'] = 30;
+ $this->template_variables['dropdownAutoWidth'] = false;
}
/**
@@ -88,6 +88,16 @@ class SelectWidget extends SidebarWidget
}
/**
+ * set the dropdown auto width (default: false)
+ * @param $dropdownAutoWidth
+ * @return void
+ */
+ public function setDropdownAutoWidth($dropdownAutoWidth)
+ {
+ $this->template_variables['dropdownAutoWidth'] = $dropdownAutoWidth;
+ }
+
+ /**
* Sets whether selecting multiple values is allowed or not
* @param bool $multiple true if selection multiple values should be allowed
*/