Commit 8f6efa7d authored by git's avatar git Committed by Bohdan Artemchuk
Browse files

Issue #3022345 by Shefarik, bohart: "Display a DSM" checkbox is ignored when...

Issue #3022345 by Shefarik, bohart: "Display a DSM" checkbox is ignored when rerouting address is empty
parent 5f0d58a0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -163,8 +163,10 @@ function reroute_email_mail_alter(&$message) {
      ]);

    // Let users know email has been aborted, but logged.
    if ($config->get(REROUTE_EMAIL_MESSAGE)) {
      \Drupal::messenger()->addMessage(t('<em>@message_id</em> was aborted by reroute email; site administrators can check the recent log entries for complete details on the rerouted email.', ['@message_id' => $message['id']]));
    }
  }
  elseif ($config->get(REROUTE_EMAIL_MESSAGE)) {

    // Display a message to let users know email was rerouted.
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ class SettingsForm extends ConfigFormBase {
      '#type' => 'checkbox',
      '#title' => $this->t('Display a Drupal status message after rerouting'),
      '#default_value' => $this->rerouteConfig->get(REROUTE_EMAIL_MESSAGE),
      '#description' => $this->t('Check this box if you would like a Drupal status message to be displayed to users after submitting an email to let them know it was rerouted to a different email address.'),
      '#description' => $this->t('Check this box if you would like a Drupal status message to be displayed to users after submitting an email to let them know it was aborted to send or rerouted to a different email address.'),
      '#states' => $states,
    ];