public function __construct($name = 'listbox', $value = null, $size = 5, $action = null)
 {
     parent::__construct($name, null, $action);
     $this->attr('multiple', 'multiple');
     $this->attr('size', $size);
     $this->setValue($value);
 }
 public function __construct($name = 'listbox', $value = NULL, $size = 5, $action = NULL)
 {
     parent::__construct($name, NULL, $action);
     $this->attributes['multiple'] = 'multiple';
     $this->attributes['size'] = $size;
     $this->setValue($value);
 }
 public function __construct($name = 'editablecombobox', $value = null, $size = 0, $action = null)
 {
     insert_javascript_for_editable_combobox();
     parent::__construct($name, $value, $action);
     parent::addAction('onfocus', 'CEditableComboBoxInit(this);');
     parent::addAction('onchange', 'CEditableComboBoxOnChange(this, ' . $size . ');');
 }
 public function __construct($name = 'editablecombobox', $value = null, $size = null, $action = null)
 {
     insert_javascript_for_editable_combobox();
     parent::__construct($name, $value, $action);
     parent::addAction('onfocus', 'CEditableComboBoxInit(this);');
     $width = $size == ZBX_TEXTBOX_STANDARD_SIZE ? ZBX_TEXTAREA_STANDARD_WIDTH : null;
     parent::addAction('onchange', 'CEditableComboBoxOnChange(this, ' . CJs::encodeJson($size) . ', ' . CJs::encodeJson($width) . ');');
     // prevent Firefox remembering selected option on page refresh
     $this->setAttribute('autocomplete', 'off');
 }
Beispiel #5
0
 public function __construct($name = 'listbox', $value = null, $size = 5, $action = null, array $items = [])
 {
     parent::__construct($name, $value, $action, $items);
     $this->setAttribute('multiple', 'multiple');
     $this->setAttribute('size', $size);
 }