Merge pull request #4667 from eileenmcnaughton/whitespace
[civicrm-core.git] / CRM / Mailing / Form / Optout.php
index 6a48d8765691e915548295008da7d7d39a840a16..69b1bd05c1073b4aa7ee7093e84db1e342fb323c 100644 (file)
@@ -64,22 +64,22 @@ class CRM_Mailing_Form_Optout extends CRM_Core_Form {
   }
 
   function buildQuickForm() {
-
+    CRM_Utils_System::addHTMLHead('<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">');
     CRM_Utils_System::setTitle(ts('Please Confirm Your Opt Out'));
 
-    $this->add('text', 'email_confirm', ts('Verify Email address to opt out:'));
-    $this->addRule('email_confirm', ts('Email address required to opt out'), 'required');
+    $this->add('text', 'email_confirm', ts('Verify email address to opt out:'));
+    $this->addRule('email_confirm', ts('Email address is required to opt out.'), 'required');
 
     $buttons = array(
-      array(
-        'type' => 'cancel',
-        'name' => ts('Cancel'),
-      ),
       array(
         'type' => 'next',
-        'name' => 'Unsubscribe',
+        'name' => 'Opt Out',
         'isDefault' => TRUE,
       ),
+      array(
+        'type' => 'cancel',
+        'name' => ts('Cancel'),
+      ),
     );
 
     $this->addButtons($buttons);
@@ -92,7 +92,6 @@ class CRM_Mailing_Form_Optout extends CRM_Core_Form {
     // check if EmailTyped matches Email address
     $result = CRM_Utils_String::compareStr($this->_email, $values['email_confirm'], TRUE);
 
-
     $job_id = $this->_job_id;
     $queue_id = $this->_queue_id;
     $hash = $this->_hash;
@@ -117,12 +116,11 @@ class CRM_Mailing_Form_Optout 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 opt out',
+      $statusMsg = ts('The email address: %1 you have entered does not match the email associated with this opt out request.',
         array(1 => $values['email_confirm'])
       );
 
-    CRM_Core_Session::setStatus( $statusMsg, '', 'fail' );
-
+      CRM_Core_Session::setStatus( $statusMsg, '', 'fail' );
     }
 
   }