Skip to content

Commit

Permalink
Merge pull request #9664 from konadave/CRM-19853
Browse files Browse the repository at this point in the history
CRM-19853 replace interval controls with numeric
  • Loading branch information
colemanw authored Jan 11, 2017
2 parents 1158b3d + dc5689e commit cdedc5f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions CRM/Admin/Form/ScheduleReminders.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ public function buildQuickForm() {
//get the frequency units.
$this->_freqUnits = CRM_Core_SelectValues::getRecurringFrequencyUnits();

$numericOptions = CRM_Core_SelectValues::getNumericOptions(0, 30);

//reminder_interval
$this->add('select', 'start_action_offset', ts('When'), $numericOptions);
$this->add('number', 'start_action_offset', ts('When'), array('class' => 'six', 'min' => 0));
$this->addRule('start_action_offset', ts('Value should be a positive number'), 'positiveInteger');

$isActive = ts('Send email');
$recordActivity = ts('Record activity for automated email');
if ($providersCount) {
Expand Down Expand Up @@ -208,9 +208,13 @@ public function buildQuickForm() {
);

$this->add('select', 'repetition_frequency_unit', ts('every'), $freqUnitsDisplay);
$this->add('select', 'repetition_frequency_interval', ts('every'), $numericOptions);
$this->add('number', 'repetition_frequency_interval', ts('every'), array('class' => 'six', 'min' => 0));
$this->addRule('repetition_frequency_interval', ts('Value should be a positive number'), 'positiveInteger');

$this->add('select', 'end_frequency_unit', ts('until'), $freqUnitsDisplay);
$this->add('select', 'end_frequency_interval', ts('until'), $numericOptions);
$this->add('number', 'end_frequency_interval', ts('until'), array('class' => 'six', 'min' => 0));
$this->addRule('end_frequency_interval', ts('Value should be a positive number'), 'positiveInteger');

$this->add('select', 'end_action', ts('Repetition Condition'), $condition, TRUE);
$this->add('select', 'end_date', ts('Date Field'), $selectedMapping->getDateFields(), TRUE);

Expand Down

0 comments on commit cdedc5f

Please sign in to comment.