code clean up
authorPhilMB <philmorbru@gmail.com>
Thu, 27 Jul 2023 01:10:40 +0000 (20:10 -0500)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 7 Aug 2023 21:04:48 +0000 (09:04 +1200)
ts variable method updated and OptOutURL removed

CRM/Mailing/Form/Unsubscribe.php
templates/CRM/Mailing/Form/Unsubscribe.tpl

index e5acb4192272690564319f06eb9950aa7694108c..cf17a06f0ace91fa5cc9b0646018033e59b9e0c3 100644 (file)
@@ -66,6 +66,12 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form {
 
     list($displayName, $email) = CRM_Mailing_Event_BAO_MailingEventQueue::getContactInfo($queue_id);
     $this->assign('display_name', $displayName);
+    $nameMasked = '';
+    $names = explode(' ', $displayName);
+    foreach ($names as $name) {
+      $nameMasked .= substr($name, 0, 2) . '***** ';
+    }
+    $this->assign('name_masked', $nameMasked);
     $emailMasked = CRM_Utils_String::maskEmail($email);
     $this->assign('email_masked', $emailMasked);
     $this->assign('email', $email);
index 8dfedfa7dbe5d609b6ac1cdb8af866704efc93c1..99c70f8cb2de0783f73199df95411cba6bd8744f 100644 (file)
@@ -10,7 +10,7 @@
 <div>
   {if $groupExist}
     <div class="messages status no-popup">
-      {ts}Are you sure you want to be removed from the mailing list(s) shown below:{/ts}<br/>
+      {ts 1=$name_masked}Are you sure you want to remove %1 from the mailing list(s) shown below:{/ts}<br/>
     </div>
     <table class="selector" style="width: auto; margin-top: 20px;">
       {counter start=0 skip=1 print=false}
@@ -22,8 +22,7 @@
       {/foreach}
     </table>
     <div class="crm-block crm-form-block crm-miscellaneous-form-block">
-      <p>{ts}You are requesting to unsubscribe this email address:{/ts}</p>
-      <p><strong>{$email_masked}</strong></p>
+      <p>{ts 1=$name_masked}You are requesting to unsubscribe <strong>all email addresses for %1</strong> from the above mailing list.{/ts}</p>
       <p>
         {ts}If this is your email address and you <strong>wish to unsubscribe</strong> please click the <strong>Unsubscribe</strong> button to confirm.{/ts}
       </p>