From bc76a7f75c070055abba3b799d7bfa2c8ab76cc2 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Fri, 2 May 2014 14:54:16 -0700 Subject: [PATCH] CRM-11302 - some syntax fixes and put buttons in standard order on the new forms. ---------------------------------------- * CRM-11302: https://issues.civicrm.org/jira/browse/CRM-11302 --- CRM/Mailing/Form/Optout.php | 16 ++++++++-------- CRM/Mailing/Form/Settings.php | 4 ++++ CRM/Mailing/Form/Unsubscribe.php | 16 ++++++++-------- templates/CRM/Mailing/Form/Optout.tpl | 4 ++-- templates/CRM/Mailing/Form/Unsubscribe.tpl | 4 ++-- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/CRM/Mailing/Form/Optout.php b/CRM/Mailing/Form/Optout.php index 6a48d87656..998efb734c 100644 --- a/CRM/Mailing/Form/Optout.php +++ b/CRM/Mailing/Form/Optout.php @@ -67,19 +67,19 @@ class CRM_Mailing_Form_Optout extends CRM_Core_Form { 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); @@ -117,7 +117,7 @@ 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']) ); diff --git a/CRM/Mailing/Form/Settings.php b/CRM/Mailing/Form/Settings.php index 15b58f1742..ed19a00bea 100644 --- a/CRM/Mailing/Form/Settings.php +++ b/CRM/Mailing/Form/Settings.php @@ -91,6 +91,10 @@ class CRM_Mailing_Form_Settings extends CRM_Core_Form { $dao->override_verp = !$dao->override_verp; $dao->storeValues($dao, $defaults); $defaults['visibility'] = $dao->visibility; + + crm_core_error::debug('$dao->visibility', $dao->visibility); + exit(); + } return $defaults; } diff --git a/CRM/Mailing/Form/Unsubscribe.php b/CRM/Mailing/Form/Unsubscribe.php index e3b351da9f..0896b7897d 100644 --- a/CRM/Mailing/Form/Unsubscribe.php +++ b/CRM/Mailing/Form/Unsubscribe.php @@ -78,19 +78,19 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form { 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 +121,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 +130,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']) ); diff --git a/templates/CRM/Mailing/Form/Optout.tpl b/templates/CRM/Mailing/Form/Optout.tpl index 48d8e610f5..6269955f68 100644 --- a/templates/CRM/Mailing/Form/Optout.tpl +++ b/templates/CRM/Mailing/Form/Optout.tpl @@ -26,10 +26,10 @@
-

You are requesting to unsubscribe this Email address:

+

You are requesting to opt out this email address from all mailing lists:

{$email_masked}

-

If this is not your Email address, there is no need to do anything. You have not been added to any mailing lists. If this is your Email address and you wish to opt out please enter your Email address below for verification purposes:

+

If this is not your email address, there is no need to do anything. You have not been added to any mailing lists. If this is your email address and you wish to opt out please enter your email address below for verification purposes:

diff --git a/templates/CRM/Mailing/Form/Unsubscribe.tpl b/templates/CRM/Mailing/Form/Unsubscribe.tpl index b2f57f5020..823aff85ff 100644 --- a/templates/CRM/Mailing/Form/Unsubscribe.tpl +++ b/templates/CRM/Mailing/Form/Unsubscribe.tpl @@ -26,10 +26,10 @@
-

You are requesting to unsubscribe this Email address:

+

You are requesting to unsubscribe this email address:

{$email_masked}

-

If this is not your Email address, there is no need to do anything. You have not been added to any mailing lists. If this is your Email address and you wish to unsubscribe please enter your Email address below for verification purposes:

+

If this is not your email address, there is no need to do anything. You have not been added to any mailing lists. If this is your email address and you wish to unsubscribe please enter your email address below for verification purposes:

-- 2.25.1