CRM_Utils_JSON::output(array('status' => 'error', 'error_msg' => 'required params missing.'));
}
- $selectionOptions = CRM_Core_BAO_ActionSchedule::getSelection1($_GET['mappingID']);
+ $selectionOptions = CRM_Core_BAO_ActionSchedule::getSelection1($_GET['mappingID'], $_GET['isLimit']);
$output = array(
'sel4' => array(),
/**
* @param int $id
+ * @param int $isLimit
*
* @return array
*/
- public static function getSelection1($id = NULL) {
+ public static function getSelection1($id = NULL, $isLimit = NULL) {
$mapping = self::getMapping($id);
$sel4 = $sel5 = array();
$options = array(
break;
case 'event_contacts':
- $eventContacts = CRM_Core_OptionGroup::values('event_contacts', FALSE, FALSE, FALSE, NULL, 'label', TRUE, FALSE, 'name');
- $sel5[$id] = $eventContacts + $options;
+ //CRM-15536, don't provide participant_role option on choosing 'Also Include' for Event entity
+ if ($isLimit == 1) {
+ $options += CRM_Core_OptionGroup::values('event_contacts', FALSE, FALSE, FALSE, NULL, 'label', TRUE, FALSE, 'name');
+ }
+ $sel5[$id] = $options;
$recipientMapping += CRM_Core_OptionGroup::values('event_contacts', FALSE, FALSE, FALSE, NULL, 'name', TRUE, FALSE, 'name');
break;
function buildSelects() {
var mappingID = $('#entity_0', $form).val();
+ var isLimit = $('#limit_to', $form).val();
- $.getJSON(CRM.url('civicrm/ajax/mapping'), {mappingID: mappingID},
+ $.getJSON(CRM.url('civicrm/ajax/mapping'), {mappingID: mappingID, isLimit: isLimit},
function (result) {
CRM.utils.setOptions($('#start_action_date', $form), result.sel4);
CRM.utils.setOptions($('#end_date', $form), result.sel4);