Improve scheduled reminder form labels. Resolves issue core/3823
authorRich Lott / Artful Robot <code.commits@artfulrobot.uk>
Wed, 31 Aug 2022 06:45:14 +0000 (07:45 +0100)
committerRich Lott / Artful Robot <code.commits@artfulrobot.uk>
Wed, 31 Aug 2022 06:45:14 +0000 (07:45 +0100)
CRM/Admin/Form/ScheduleReminders.php
templates/CRM/Admin/Form/ScheduleReminders.tpl

index 8a4e7385788d506cac1e3e4276c88a6634ce2907..4f4420b5a2f62414ff6675166daab83f7eae0d9a 100644 (file)
@@ -158,7 +158,7 @@ class CRM_Admin_Form_ScheduleReminders extends CRM_Admin_Form {
     $this->_freqUnits = CRM_Core_SelectValues::getRecurringFrequencyUnits();
 
     //reminder_interval
-    $this->add('number', 'start_action_offset', ts('When'), ['class' => 'six', 'min' => 0]);
+    $this->add('number', 'start_action_offset', ts('When (trigger date)'), ['class' => 'six', 'min' => 0]);
     $this->addRule('start_action_offset', ts('Value should be a positive number'), 'positiveInteger');
 
     $isActive = ts('Scheduled Reminder Active');
index 25fb8e16fdd143887056b09b074d395b2003f7a2..5cdf8d7a6383e29709f5950e3878288af8185c77 100644 (file)
     </tr>
     <tr class="crm-scheduleReminder-effective_start_date">
       <td class="right">{$form.effective_start_date.label}</td>
-      <td colspan="3">{$form.effective_start_date.html} <div class="description"></div></td>
+      <td colspan="3">{$form.effective_start_date.html} <div class="description">{ts}Earliest trigger date to <em>include</em>.{/ts}</div></td>
     </tr>
     <tr class="crm-scheduleReminder-effective_end_date">
       <td class="right">{$form.effective_end_date.label}</td>
-      <td colspan="3">{$form.effective_end_date.html} <div class="description"></div></td>
+      <td colspan="3">{$form.effective_end_date.html} <div class="description">{ts}Earliest trigger date to <em>exclude</em>.{/ts}</div></td>
     </tr>
     <tr>
       <td class="label" width="20%">{$form.from_name.label}</td>
       var $form = $('form.{/literal}{$form.formClass}{literal}'),
         recipientMapping = eval({/literal}{$recipientMapping}{literal});
 
-      updatedEffectiveDateDescription($('#entity_0 option:selected').text(), $('#start_action_date option:selected').text());
-      $('#entity_0, #start_action_date', $form).change(function() {
-       updatedEffectiveDateDescription($('#entity_0 option:selected').text(), $('#start_action_date option:selected').text());
-      });
-
       $('#absolute_date', $form).change(function() {
         $('.crm-scheduleReminder-effective_start_date, .crm-scheduleReminder-effective_end_date').toggle(($(this).val() === null));
       });
       loadMsgBox();
       $('#mode', $form).change(loadMsgBox);
 
-      function updatedEffectiveDateDescription(entityText, startActionDateText) {
-        $('.crm-scheduleReminder-effective_start_date .description').text(ts('Earliest %1 %2 to include.', {1: entityText, 2: startActionDateText}));
-        $('.crm-scheduleReminder-effective_end_date .description').text(ts('Earliest %1 %2 to exclude.', {1: entityText, 2: startActionDateText}));
-      }
-
       function populateRecipient() {
         var mappingID = $('#entity_0', $form).val() || $('[name^=mappingID]', $form).val();
         var recipient = $("#recipient", $form).val();