Skip to content

Commit

Permalink
replace element with advmultiselect
Browse files Browse the repository at this point in the history
  • Loading branch information
Jitendra Purohit committed Nov 11, 2017
1 parent ac98337 commit d236326
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
8 changes: 6 additions & 2 deletions CRM/Admin/Form/Preferences.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,14 @@ public function buildQuickForm() {
$this->addElement('select',
$fieldName,
$fieldValue['title'],
$fieldValue['option_values'],
CRM_Utils_Array::value('attributes', $fieldValue)
$fieldValue['option_values']
);
break;

case 'advmultiselect':
$this->addElement('advmultiselect', $fieldName, $fieldValue['title'], $fieldValue['options'], $fieldValue['attributes']);
break;

case 'wysiwyg':
$this->add('wysiwyg', $fieldName, $fieldValue['title'], $fieldValue['attributes']);
break;
Expand Down Expand Up @@ -273,6 +276,7 @@ public function postProcessCommon() {

case 'text':
case 'select':
case 'advmultiselect':
case 'radio':
case 'YesNo':
case 'entity_reference':
Expand Down
10 changes: 7 additions & 3 deletions CRM/Admin/Form/Preferences/Display.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,13 @@ public function preProcess() {
'weight' => 13,
),
'filter_activity_type_notification' => array(
'html_type' => 'select',
'option_values' => $optionValues,
'attributes' => array('multiple' => 1, "class" => "crm-select2"),
'html_type' => 'advmultiselect',
'options' => $optionValues,
'attributes' => array(
'size' => 5,
'style' => 'width:150px',
'class' => 'advmultiselect',
),
'title' => ts('Blocked Activity Types.'),
'weight' => 14,
),
Expand Down
10 changes: 6 additions & 4 deletions settings/Core.setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -975,17 +975,19 @@
'add' => '4.7',
'is_domain' => 1,
'is_contact' => 0,
'default' => array(),
'description' => 'Select Activity types to disable assignee notifications.',
'title' => 'Filter Activity Type Notification',
'help_text' => '',
'html_type' => 'Select',
'html_type' => 'advmultiselect',
'html_attributes' => array(
'multiple' => 1,
'class' => 'crm-select2',
'size' => 5,
'style' => 'width:150px',
'class' => 'advmultiselect',
),
'pseudoconstant' => array(
'optionGroupName' => 'activity_type',
),
'quick_form_type' => 'Select',
'quick_form_type' => 'Element',
),
);

0 comments on commit d236326

Please sign in to comment.