);
}
+ if (count($groups) <= 10) {
+ // setting minimum height to 2 since widget looks strange when size (height) is 1
+ $groupSize = max(count($groups), 2);
+ }
+ else {
+ $groupSize = 10;
+ }
$inG = &$this->addElement('advmultiselect', 'includeGroups',
ts('Include Group(s)') . ' ',
$groups,
array(
- 'size' => 5,
- 'style' => 'width:240px',
+ 'size' => $groupSize,
+ 'style' => 'width:auto; min-width:240px;',
'class' => 'advmultiselect',
)
);
ts('Exclude Group(s)') . ' ',
$groups,
array(
- 'size' => 5,
- 'style' => 'width:240px',
+ 'size' => $groupSize,
+ 'style' => 'width:auto; min-width:240px;',
'class' => 'advmultiselect',
)
);
$inG->setButtonAttributes('remove', array('value' => ts('<< Remove')));
$outG->setButtonAttributes('remove', array('value' => ts('<< Remove')));
+ if (count($mailings) <= 10) {
+ // setting minimum height to 2 since widget looks strange when size (height) is 1
+ $mailingSize = max(count($mailings), 2);
+ }
+ else {
+ $mailingSize = 10;
+ }
$inM = &$this->addElement('advmultiselect', 'includeMailings',
ts('INCLUDE Recipients of These Mailing(s)') . ' ',
$mailings,
array(
- 'size' => 5,
- 'style' => 'width:240px',
+ 'size' => $mailingSize,
+ 'style' => 'width:auto; min-width:240px;',
'class' => 'advmultiselect',
)
);
ts('EXCLUDE Recipients of These Mailing(s)') . ' ',
$mailings,
array(
- 'size' => 5,
- 'style' => 'width:240px',
+ 'size' => $mailingSize,
+ 'style' => 'width:auto; min-width:240px;',
'class' => 'advmultiselect',
)
);