whitepace y, std is => array( on same line,
[civicrm-core.git] / CRM / Mailing / Form / Unsubscribe.php
index e3b351da9f5712ad20e196a68380d5de4e5542f6..b164f22ee56dfef25fa425b31fff6a04c4681f48 100644 (file)
@@ -70,27 +70,33 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form {
         $groupExist = TRUE;
       }
     }
+    if (!$groupExist) {
+      $statusMsg = ts('Email: %1 has been successfully unsubscribed from this Mailing List/Group.',
+        array(1 => $email)
+      );
+      CRM_Core_Session::setStatus( $statusMsg, '', 'fail' );
+    }
     $this->assign('groupExist', $groupExist);
 
   }
 
   function buildQuickForm() {
-
+    CRM_Utils_System::addHTMLHead('<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">');
     CRM_Utils_System::setTitle(ts('Please Confirm Your Unsubscribe from this Mailing/Group'));
 
-    $this->add('text', 'email_confirm', ts('Verify Email address to unsubscribe:'));
-    $this->addRule('email_confirm', ts('Email address required to unsubscribe'), 'required');
+    $this->add('text', 'email_confirm', ts('Verify email address to unsubscribe:'));
+    $this->addRule('email_confirm', ts('Email address is required to unsubscribe.'), 'required');
 
     $buttons = array(
-      array(
-        'type' => 'cancel',
-        'name' => ts('Cancel'),
-      ),
       array(
         'type' => 'next',
         'name' => 'Unsubscribe',
         'isDefault' => TRUE,
       ),
+      array(
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ),
     );
 
     $this->addButtons($buttons);
@@ -121,7 +127,7 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form {
         CRM_Mailing_Event_BAO_Unsubscribe::send_unsub_response($queue_id, $groups, FALSE, $job_id);
       }
 
-      $statusMsg = ts('Email: %1 has been successfully unsubscribed from this Mailing/Group',
+      $statusMsg = ts('Email: %1 has been successfully unsubscribed from this Mailing List/Group.',
         array(1 => $values['email_confirm'])
       );
 
@@ -130,7 +136,7 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form {
     else if ($result == FALSE) {
       // Email address not verified
 
-      $statusMsg = ts('Email: %1 you have entered does not match the Email address associated with this unsubscribe',
+      $statusMsg = ts('The email address: %1 you have entered does not match the email associated with this unsubscribe request.',
         array(1 => $values['email_confirm'])
       );