From 575a65d989fc71334eb8943ef943ee875015f464 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 5 Mar 2015 21:35:21 -0500 Subject: [PATCH] CRM-15932 - Show total number of events not just number of children --- CRM/Core/Form/RecurringEntity.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Form/RecurringEntity.php b/CRM/Core/Form/RecurringEntity.php index 7f73df3ec9..d2ebb430ec 100644 --- a/CRM/Core/Form/RecurringEntity.php +++ b/CRM/Core/Form/RecurringEntity.php @@ -209,7 +209,11 @@ class CRM_Core_Form_RecurringEntity { '2' => ts('On'), ); $form->addRadio('ends', ts("Ends"), $eoptionTypes, array('class' => 'required'), NULL); - $form->add('select', 'start_action_offset', NULL, CRM_Core_SelectValues::getNumericOptions(1, 30), FALSE); + // Offset options gets key=>val pairs like 1=>2 because the BAO wants to know the number of + // children while it makes more sense to the user to see the total number including the parent. + $offsetOptions = range(1, 30); + unset($offsetOptions[0]); + $form->add('select', 'start_action_offset', NULL, $offsetOptions, FALSE); $form->addFormRule(array('CRM_Core_Form_RecurringEntity', 'formRule')); $form->addDate('repeat_absolute_date', ts('On'), FALSE, array('formatType' => 'mailing')); $form->add('text', 'exclude_date_list', ts('Exclude Dates'), array( -- 2.25.1