CRM-15409 - Form button cleanup
authorColeman Watts <coleman@civicrm.org>
Tue, 6 Jan 2015 02:05:31 +0000 (21:05 -0500)
committerColeman Watts <coleman@civicrm.org>
Tue, 6 Jan 2015 02:05:31 +0000 (21:05 -0500)
CRM/Contribute/Form/Task/Invoice.php
css/civicrm.css
templates/CRM/Contribute/Form/ContributionView.tpl
templates/CRM/Contribute/Form/Task/Invoice.tpl

index a8018b7bb1dde1629e4bb43bca9e8140bde4b052..4b1fde72a40d1444ef2a680d25fe9e5368112e1c 100644 (file)
@@ -191,34 +191,18 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task {
       'cols' => 40
     ));
 
-    if ($this->_selectedOutput == 'email') {
-      $this->addButtons(array(
-          array(
-            'type' => 'upload',
-            'name' => ts('Email Invoice'),
-            'isDefault' => TRUE,
-          ),
-          array(
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ),
-        )
-      );
-    }
-    else {
-      $this->addButtons(array(
-          array(
-            'type' => 'upload',
-            'name' => ts('Process Invoice(s)'),
-            'isDefault' => TRUE,
-          ),
-          array(
-            'type' => 'cancel',
-            'name' => ts('Cancel'),
-          ),
-        )
-      );
-    }
+    $this->addButtons(array(
+        array(
+          'type' => 'upload',
+          'name' => $this->_selectedOutput == 'email' ? ts('Send Email') : ts('Process Invoice(s)'),
+          'isDefault' => TRUE,
+        ),
+        array(
+          'type' => 'cancel',
+          'name' => ts('Cancel'),
+        ),
+      )
+    );
   }
 
   /**
index 6b7853e1fcc41e9b93da957647ff747514dd9bfd..d36696adbb3c08dbf9eb0be9dd09872f03732d14 100644 (file)
@@ -4594,10 +4594,6 @@ span.crm-status-icon {
   text-decoration: line-through;
 }
 
-.crm-printButton {
-  float: right;
-}
-
 .crm-container input.ng-invalid.ng-dirty,
 .crm-container select.ng-invalid.ng-dirty,
 .crm-container textarea.ng-invalid.ng-dirty {
index 502b711d492bc7ce6c22939837b7611d25b4c069..d9b96ae4bacc9813ff5515153f5fc3f585c2ba98 100644 (file)
     {assign var='pdfUrlParams' value="reset=1&id=$id&cid=$contact_id"}
     {assign var='emailUrlParams' value="reset=1&id=$id&cid=$contact_id&select=email"}
     {if $invoicing && $cancelledStatus}
-      <div class="crm-printButton">
+      <div class="css_right">
         <a class="button no-popup" href="{crmURL p='civicrm/contribute/invoice' q=$pdfUrlParams}">
+          <div class="icon ui-icon-print"></div>
         {if $contribution_status != 'Refunded'}
           {ts}Print Invoice{/ts}</a>
         {else}
           {ts}Print Invoice and Credit Note{/ts}</a>
         {/if}
         <a class="button" href="{crmURL p='civicrm/contribute/invoice/email' q=$emailUrlParams}">
+          <div class="icon ui-icon-mail-closed"></div>
           {ts}Email Invoice{/ts}</a>
       </div>
     {/if}
           class="icon delete-icon"></div>{ts}Delete{/ts}</span></a>
   {/if}
   {include file="CRM/common/formButtons.tpl" location="bottom"}
-  {if $invoicing && $cancelledStatus}
-    <div class="crm-printButton">
-      <a class="button no-popup" href="{crmURL p='civicrm/contribute/invoice' q=$pdfUrlParams}">
-      {if $contribution_status != 'Refunded'}
-        {ts}Print Invoice{/ts}</a>
-      {else}
-        {ts}Print Invoice and Credit Note{/ts}</a>
-      {/if}
-      <a class="button" href="{crmURL p='civicrm/contribute/invoice/email' q=$emailUrlParams}">
-        {ts}Email Invoice{/ts}</a>
-    </div>
-  {/if}
 </div>
 </div>
index 309cf6f7c8f52a20917ad92d15b43f3776666a1f..e0bced194a11486ae119bb246b3f852aeecbd017 100644 (file)
@@ -58,7 +58,7 @@
 </table>
 
 <div class="spacer"></div>
-<div class="form-item">
+<div class="crm-submit-buttons">
   {$form.buttons.html}
 </div>