X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FSMS%2FForm%2FGroup.php;h=ca4ac6d06cb6afaf20ca3ee923e3f6fffc5c2e1c;hb=fcba99eb6892c1006a16fc5451e7074d602b7ade;hp=e3d6cd83e52e470ddd5dec6078a9e2380f65719b;hpb=c1c7a930efe9d1539a018b16d5725933e4843d2b;p=civicrm-core.git diff --git a/CRM/SMS/Form/Group.php b/CRM/SMS/Form/Group.php index e3d6cd83e5..ca4ac6d06c 100644 --- a/CRM/SMS/Form/Group.php +++ b/CRM/SMS/Form/Group.php @@ -1,9 +1,9 @@ addElement('advmultiselect', 'includeGroups', - ts('Include Group(s)') . ' ', - $groups, - array( - 'size' => 5, - 'style' => 'width:240px', - 'class' => 'advmultiselect', - ) + $select2style = array( + 'multiple' => TRUE, + 'style' => 'width: 100%; max-width: 60em;', + 'class' => 'crm-select2', + 'placeholder' => ts('- select -'), ); - $this->addRule('includeGroups', ts('Please select a group to be SMSed.'), 'required'); - - $outG = &$this->addElement('advmultiselect', 'excludeGroups', - ts('Exclude Group(s)') . ' ', + $this->add('select', 'includeGroups', + ts('Include Group(s)'), $groups, - array( - 'size' => 5, - 'style' => 'width:240px', - 'class' => 'advmultiselect', - ) + TRUE, + $select2style ); - $inG->setButtonAttributes('add', array('value' => ts('Add >>'))); - $outG->setButtonAttributes('add', array('value' => ts('Add >>'))); - $inG->setButtonAttributes('remove', array('value' => ts('<< Remove'))); - $outG->setButtonAttributes('remove', array('value' => ts('<< Remove'))); + $this->add('select', 'excludeGroups', + ts('Exclude Group(s)'), + $groups, + FALSE, + $select2style + ); - $inM = &$this->addElement('advmultiselect', 'includeMailings', - ts('INCLUDE Recipients of These Mailing(s)') . ' ', + $this->add('select', 'includeMailings', + ts('INCLUDE Recipients of These Message(s)'), $mailings, - array( - 'size' => 5, - 'style' => 'width:240px', - 'class' => 'advmultiselect', - ) + FALSE, + $select2style ); - $outM = &$this->addElement('advmultiselect', 'excludeMailings', - ts('EXCLUDE Recipients of These Mailing(s)') . ' ', + $this->add('select', 'excludeMailings', + ts('EXCLUDE Recipients of These Message(s)'), $mailings, - array( - 'size' => 5, - 'style' => 'width:240px', - 'class' => 'advmultiselect', - ) + FALSE, + $select2style ); - $inM->setButtonAttributes('add', array('value' => ts('Add >>'))); - $outM->setButtonAttributes('add', array('value' => ts('Add >>'))); - $inM->setButtonAttributes('remove', array('value' => ts('<< Remove'))); - $outM->setButtonAttributes('remove', array('value' => ts('<< Remove'))); - $this->addFormRule(array('CRM_SMS_Form_Group', 'formRule')); $buttons = array(