dev/core#481 Ensure that Bulk Mailings is a checkbox rather than radio to allow for...
authorSeamus Lee <seamuslee001@gmail.com>
Sat, 27 Oct 2018 04:51:30 +0000 (15:51 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Sat, 27 Oct 2018 04:59:57 +0000 (15:59 +1100)
Fix UI handling when in multiple bulk email mode

CRM/Contact/Form/Edit/Email.php
templates/CRM/Contact/Form/Edit/Email.tpl
templates/CRM/Contact/Form/Inline/Email.tpl

index 47ed4a448913fac957be8866eeafb66e8045b82d..ead5e8392ded307b77efee670b9eea401a487b93 100644 (file)
@@ -83,15 +83,10 @@ class CRM_Contact_Form_Edit_Email {
       //Bulkmail checkbox
       $form->assign('multipleBulk', $multipleBulk);
       $js = array('id' => "Email_" . $blockId . "_IsBulkmail" , 'aria-label' => ts('Bulk Mailing for Email %1?', [1 => $blockId]));
-      if ($multipleBulk) {
-        $form->addElement('advcheckbox', "email[$blockId][is_bulkmail]", NULL, '', $js);
-      }
-      else {
-        if (!$blockEdit) {
-          $js['onClick'] = 'singleSelect( this.id );';
-        }
-        $form->addElement('radio', "email[$blockId][is_bulkmail]", '', '', '1', $js);
+      if (!$blockEdit) {
+        $js['onClick'] = 'singleSelect( this.id );';
       }
+      $form->addElement('advcheckbox', "email[$blockId][is_bulkmail]", NULL, '', $js);
 
       //is_Primary radio
       $js = array('id' => "Email_" . $blockId . "_IsPrimary", 'aria-label' => ts('Email %1 is primary?', [1 => $blockId]));
index c810f2a3cb562fe98ff4ef6faa915606b1b5b988..c09af5563db14e6ee367ab18e6484c2513a53f19 100644 (file)
     {/if}
   </td>
   <td align="center">{$form.email.$blockId.on_hold.html}</td>
-  {if $multipleBulk}
-    <td align="center" id="Email-Bulkmail-html">{$form.email.$blockId.is_bulkmail.html}</td>
-  {else}
-    <td align="center" id="Email-Bulkmail-html">{$form.email.$blockId.is_bulkmail.1.html}</td>
-  {/if}
+  <td align="center" id="Email-Bulkmail-html">{$form.email.$blockId.is_bulkmail.html}</td>
   <td align="center" id="Email-Primary-html" {if $blockId eq 1}class="hiddenElement"{/if}>
     {$form.email.$blockId.is_primary.1.html}
   </td>
index 2d534df3deeac5c6c3d067eb13391ee743589e2d..90cf8b4f00f3eda28159f878a80b6f14b94d7deb 100644 (file)
     <tr id="Email_Block_{$blockId}" {if $blockId gt $actualBlockCount}class="hiddenElement"{/if}>
       <td>{$form.email.$blockId.email.html|crmAddClass:email}&nbsp;{$form.email.$blockId.location_type_id.html}</td>
       <td align="center">{$form.email.$blockId.on_hold.html}</td>
-      {if $multipleBulk}
-        <td align="center">{$form.email.$blockId.is_bulkmail.html}</td>
-      {else}
-        <td align="center" class="crm-email-bulkmail">{$form.email.$blockId.is_bulkmail.1.html}</td>
-      {/if}
+      <td align="center" {if !$multipleBulk}class="crm-email-bulkmail"{/if}>{$form.email.$blockId.is_bulkmail.html}</td>
       <td align="center" class="crm-email-is_primary">{$form.email.$blockId.is_primary.1.html}</td>
       <td>
         {if $blockId gt 1}