From 8c779cf85f34ab17419c529991fee771d39e9541 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 5 Jan 2015 21:05:31 -0500 Subject: [PATCH] CRM-15409 - Form button cleanup --- CRM/Contribute/Form/Task/Invoice.php | 40 ++++++------------- css/civicrm.css | 4 -- .../CRM/Contribute/Form/ContributionView.tpl | 16 ++------ .../CRM/Contribute/Form/Task/Invoice.tpl | 2 +- 4 files changed, 16 insertions(+), 46 deletions(-) diff --git a/CRM/Contribute/Form/Task/Invoice.php b/CRM/Contribute/Form/Task/Invoice.php index a8018b7bb1..4b1fde72a4 100644 --- a/CRM/Contribute/Form/Task/Invoice.php +++ b/CRM/Contribute/Form/Task/Invoice.php @@ -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'), + ), + ) + ); } /** diff --git a/css/civicrm.css b/css/civicrm.css index 6b7853e1fc..d36696adbb 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -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 { diff --git a/templates/CRM/Contribute/Form/ContributionView.tpl b/templates/CRM/Contribute/Form/ContributionView.tpl index 502b711d49..d9b96ae4ba 100644 --- a/templates/CRM/Contribute/Form/ContributionView.tpl +++ b/templates/CRM/Contribute/Form/ContributionView.tpl @@ -48,14 +48,16 @@ {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} -
+ {/if} @@ -324,17 +326,5 @@ class="icon delete-icon">
{ts}Delete{/ts} {/if} {include file="CRM/common/formButtons.tpl" location="bottom"} - {if $invoicing && $cancelledStatus} -
- - {if $contribution_status != 'Refunded'} - {ts}Print Invoice{/ts} - {else} - {ts}Print Invoice and Credit Note{/ts} - {/if} - - {ts}Email Invoice{/ts} -
- {/if} diff --git a/templates/CRM/Contribute/Form/Task/Invoice.tpl b/templates/CRM/Contribute/Form/Task/Invoice.tpl index 309cf6f7c8..e0bced194a 100644 --- a/templates/CRM/Contribute/Form/Task/Invoice.tpl +++ b/templates/CRM/Contribute/Form/Task/Invoice.tpl @@ -58,7 +58,7 @@
-
+
{$form.buttons.html}
-- 2.25.1