diff --git a/src/Form/NodeTabForm.php b/src/Form/NodeTabForm.php index 1618013..7e8ecb7 100644 --- a/src/Form/NodeTabForm.php +++ b/src/Form/NodeTabForm.php @@ -106,21 +106,29 @@ class NodeTabForm extends FormBase { else { $form['recipient_handler']['#suffix'] = '
'; } - // Generate text to display in send field. + + // Add some text to describe the send situation. + $form['send']['count'] = array( + '#type' => 'item', + '#markup' => t('Send newsletter to @count subscribers.', array('@count' => $subscriber_count)), + ); if (!$config->get('mail.use_cron')) { - $send_text = t('Send newsletter to @count subscribers. Mails will be sent immediately.', array('@count' => $subscriber_count)); + $send_text = t('Mails will be sent immediately.', array('@count' => $subscriber_count)); } else { - $send_text = t('Send newsletter to @count subscribers. Mails will be sent when cron runs.', array('@count' => $subscriber_count)); - } - if(!$node->isPublished()){ - $send_text .= t('Sending is delayed until node is published.'); + $send_text = t('Mails will be sent when cron runs.', array('@count' => $subscriber_count)); } - - $form['send']['text'] = array( + $form['send']['method'] = array( '#type' => 'item', - '#title' => $send_text, + '#markup' => $send_text, ); + + if (!$node->isPublished()) { + $form['send']['unpublished'] = array( + '#type' => 'item', + '#markup' => t('Sending is delayed until node is published.'), + ); + } $form['send']['send_button'] = array( '#type' => 'submit', '#button_type' => 'primary',