break;
case 'textarea':
- $this->addElement('textarea',
+ case 'checkbox':
+ $this->add($fieldValue['html_type'],
$fieldName,
$fieldValue['title']
);
break;
- case 'checkbox':
- $this->addElement('checkbox',
- $fieldName,
- $fieldValue['title']
- );
+ case 'radio':
+ $options = CRM_Core_OptionGroup::values($fieldName, FALSE, FALSE, TRUE);
+ $this->addRadio($fieldName, $fieldValue['title'], $options, NULL, ' ');
break;
case 'checkboxes':
'title' => ts('Viewing Contacts'),
'weight' => 1,
),
+ 'contact_smart_group_display' => array(
+ 'html_type' => 'radio',
+ 'title' => ts('Viewing Smart Groups'),
+ 'weight' => 2,
+ ),
'contact_edit_options' => array(
'html_type' => 'checkboxes',
'title' => ts('Editing Contacts'),
- 'weight' => 2,
+ 'weight' => 3,
),
'advanced_search_options' => array(
'html_type' => 'checkboxes',
'title' => ts('Contact Search'),
- 'weight' => 3,
+ 'weight' => 4,
),
'activity_assignee_notification' => array(
'html_type' => 'checkbox',
'activity_assignee_notification_ics' => array(
'html_type' => 'checkbox',
'title' => ts('Include ICal Invite to Activity Assignees'),
- 'weight' => 5,
+ 'weight' => 6,
),
'contact_ajax_check_similar' => array(
'html_type' => 'checkbox',
'title' => ts('Check for Similar Contacts'),
- 'weight' => 5,
+ 'weight' => 7,
),
'user_dashboard_options' => array(
'html_type' => 'checkboxes',
'title' => ts('Contact Dashboard'),
- 'weight' => 6,
+ 'weight' => 8,
),
'display_name_format' => array(
'html_type' => 'textarea',
'title' => ts('Individual Display Name Format'),
- 'weight' => 7,
+ 'weight' => 9,
),
'sort_name_format' => array(
'html_type' => 'textarea',
'title' => ts('Individual Sort Name Format'),
- 'weight' => 8,
+ 'weight' => 10,
),
'editor_id' => array(
'html_type' => NULL,
- 'weight' => 9,
+ 'weight' => 11,
),
),
);
-
parent::preProcess();
}
<td class="label">{$form.contact_view_options.label}</td>
<td>{$form.contact_view_options.html}</td>
</tr>
+ <tr class="crm-preferences-display-form-block-contact_smart_group_display">
+ <td class="label">{$form.contact_smart_group_display.label}</td>
+ <td>{$form.contact_smart_group_display.html}</td>
+ </tr>
<tr class="crm-preferences-display-form-block-description">
<td> </td>
<td class="description">