From fd66df85d1a08e842073a51334fc4dceca81914f Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 8 Jan 2015 21:58:20 -0500 Subject: [PATCH] CRM-15789 - Additional button/icon cleanup --- CRM/Contact/Form/Merge.php | 56 +++++++------------ CRM/Mailing/Form/Schedule.php | 2 +- CRM/SMS/Form/Schedule.php | 2 +- css/crm.designer.css | 3 +- js/view/crm.designer.js | 20 +------ templates/CRM/Campaign/Page/Campaign.tpl | 8 ++- templates/CRM/Campaign/Page/Petition.tpl | 8 ++- templates/CRM/Campaign/Page/Survey.tpl | 8 ++- templates/CRM/Case/Page/DashBoard.tpl | 2 +- templates/CRM/Case/Page/DashboardSelector.tpl | 4 +- templates/CRM/Contact/Form/Merge.tpl | 21 +++++-- templates/CRM/Contact/Page/DedupeFind.tpl | 12 +++- templates/CRM/Contribute/Page/PaymentInfo.tpl | 5 +- templates/CRM/Custom/Form/Field.tpl | 9 ++- templates/CRM/Dashlet/Page/CaseDashboard.tpl | 4 +- .../Event/Form/ParticipantFeeSelection.tpl | 2 +- templates/CRM/Report/Page/Options.tpl | 4 +- 17 files changed, 91 insertions(+), 79 deletions(-) diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php index ae06c8bbfa..383c6491cb 100644 --- a/CRM/Contact/Form/Merge.php +++ b/CRM/Contact/Form/Merge.php @@ -261,47 +261,33 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { public function buildQuickForm() { CRM_Utils_System::setTitle(ts('Merge %1s', array(1 => $this->_contactType))); - $name = ts('Merge'); - if ($this->next) { - $name = ts('Merge and Goto Next Pair'); - } + $buttons = array(); + + $buttons[] = array( + 'type' => 'next', + 'name' => $this->next ? ts('Merge and Goto Next Pair') : ts('Merge'), + 'isDefault' => TRUE, + 'icon' => $this->next ? 'circle-triangle-e' : 'check', + ); if ($this->next || $this->prev) { - $button = array( - array( - 'type' => 'next', - 'name' => $name, - 'isDefault' => TRUE, - ), - array( - 'type' => 'submit', - 'name' => ts('Merge and Goto Listing'), - ), - array( - 'type' => 'done', - 'name' => ts('Merge and View Result'), - ), - array( - 'type' => 'cancel', - 'name' => ts('Cancel'), - ), + $buttons[] = array( + 'type' => 'submit', + 'name' => ts('Merge and Goto Listing'), ); - } - else { - $button = array( - array( - 'type' => 'next', - 'name' => $name, - 'isDefault' => TRUE, - ), - array( - 'type' => 'cancel', - 'name' => ts('Cancel'), - ), + $buttons[] = array( + 'type' => 'done', + 'name' => ts('Merge and View Result'), + 'icon' => 'circle-check' ); } - $this->addButtons($button); + $buttons[] = array( + 'type' => 'cancel', + 'name' => ts('Cancel'), + ); + + $this->addButtons($buttons); $this->addFormRule(array('CRM_Contact_Form_Merge', 'formRule'), $this); } diff --git a/CRM/Mailing/Form/Schedule.php b/CRM/Mailing/Form/Schedule.php index 17810869f4..9df12ba0d6 100644 --- a/CRM/Mailing/Form/Schedule.php +++ b/CRM/Mailing/Form/Schedule.php @@ -242,7 +242,7 @@ class CRM_Mailing_Form_Schedule extends CRM_Core_Form { CRM_Core_Session::setStatus($status, ts('Mailing Saved'), 'success'); CRM_Utils_System::redirect($url); } - if (isset($params['now']) || CRM_Utils_Array::value('_qf_Schedule_back', $params) == '<< Previous') { + if (isset($params['now']) || CRM_Utils_Array::value('_qf_Schedule_back', $params) == ts('Previous')) { return TRUE; } diff --git a/CRM/SMS/Form/Schedule.php b/CRM/SMS/Form/Schedule.php index a75cd67df7..520f3d653a 100644 --- a/CRM/SMS/Form/Schedule.php +++ b/CRM/SMS/Form/Schedule.php @@ -131,7 +131,7 @@ class CRM_SMS_Form_Schedule extends CRM_Core_Form { $url = CRM_Utils_System::url('civicrm/mailing/browse/unscheduled', 'scheduled=false&reset=1&sms=1'); CRM_Utils_System::redirect($url); } - if (isset($params['now']) || CRM_Utils_Array::value('_qf_Schedule_back', $params) == '<< Previous') { + if (isset($params['now']) || CRM_Utils_Array::value('_qf_Schedule_back', $params) == ts('Previous')) { return TRUE; } diff --git a/css/crm.designer.css b/css/crm.designer.css index a1d9ff7efe..755c1820b3 100644 --- a/css/crm.designer.css +++ b/css/crm.designer.css @@ -154,8 +154,7 @@ font-size: .8em; } -.crm-designer .crm-designer-palette-tree span.ui-button-text, -.crm-designer .crm-designer-edit-custom span.ui-button-text { +.crm-designer .crm-designer-palette-tree span.ui-button-text { padding: 0.4em; } diff --git a/js/view/crm.designer.js b/js/view/crm.designer.js index e62167f895..51ca8a5706 100644 --- a/js/view/crm.designer.js +++ b/js/view/crm.designer.js @@ -660,8 +660,8 @@ } }); if (this.model.get('field_name').split('_')[0] == 'custom') { - this.$('.crm-designer-field-summary > div').append(''); - this.$('button.crm-designer-edit-custom').button().attr('title', ts('Edit global settings for this custom field.')); + this.$('.crm-designer-field-summary > div').append(''); + this.$('button.crm-designer-edit-custom').button({icons: {primary: 'ui-icon-pencil'}}).attr('title', ts('Edit global settings for this custom field.')); } } }, @@ -672,23 +672,9 @@ reset: 1, id: this.model.get('field_name').split('_')[1] }); - var form1 = CRM.loadForm(url, {openInline: '.crm-custom-field-form-block-data_type a'}) + var form1 = CRM.loadForm(url) .on('crmFormLoad', function() { $(this).prepend('
' + ts('Note: This will modify the field system-wide, not just in this profile form.') + '
'); - var $link = $('.action-link a', this); - if ($link.length) { - $link.detach(); - var buttons = {}; - buttons[$link.text()] = function() { - var form2 = CRM.loadForm($link.attr('href'), { - dialog: { - width: '60%', - height: '70%' - } - }); - }; - $(this).dialog('option', 'buttons', buttons); - } }); }, onChangeIsDuplicate: function(model, value, options) { diff --git a/templates/CRM/Campaign/Page/Campaign.tpl b/templates/CRM/Campaign/Page/Campaign.tpl index 380819411c..2c0d634b13 100644 --- a/templates/CRM/Campaign/Page/Campaign.tpl +++ b/templates/CRM/Campaign/Page/Campaign.tpl @@ -26,7 +26,9 @@ {* this template is used for displaying survey information *} {if $campaigns} {include file="CRM/common/enableDisableApi.tpl"}
@@ -65,5 +67,7 @@
{/if} diff --git a/templates/CRM/Campaign/Page/Petition.tpl b/templates/CRM/Campaign/Page/Petition.tpl index c9c2f9c8ae..b075e1817a 100644 --- a/templates/CRM/Campaign/Page/Petition.tpl +++ b/templates/CRM/Campaign/Page/Petition.tpl @@ -27,7 +27,9 @@ {if $surveys} {include file="CRM/common/enableDisableApi.tpl"} {include file="CRM/common/jsortable.tpl"} @@ -68,5 +70,7 @@ {/if} diff --git a/templates/CRM/Campaign/Page/Survey.tpl b/templates/CRM/Campaign/Page/Survey.tpl index c9c2f9c8ae..b075e1817a 100644 --- a/templates/CRM/Campaign/Page/Survey.tpl +++ b/templates/CRM/Campaign/Page/Survey.tpl @@ -27,7 +27,9 @@ {if $surveys} {include file="CRM/common/enableDisableApi.tpl"} {include file="CRM/common/jsortable.tpl"} @@ -68,5 +70,7 @@ {/if} diff --git a/templates/CRM/Case/Page/DashBoard.tpl b/templates/CRM/Case/Page/DashBoard.tpl index 6725561304..42f8d5326a 100644 --- a/templates/CRM/Case/Page/DashBoard.tpl +++ b/templates/CRM/Case/Page/DashBoard.tpl @@ -36,7 +36,7 @@ {if $newClient and $allowToAddNewCase}
{ts}Add Case{/ts}
{/if} - {ts}Find My Cases{/ts} + {ts}Find My Cases{/ts}
{if $myCases} diff --git a/templates/CRM/Case/Page/DashboardSelector.tpl b/templates/CRM/Case/Page/DashboardSelector.tpl index abcb238a12..3dddbdd597 100644 --- a/templates/CRM/Case/Page/DashboardSelector.tpl +++ b/templates/CRM/Case/Page/DashboardSelector.tpl @@ -78,11 +78,11 @@ {elseif $list eq 'recent'} {if $row.case_recent_activity_viewable} - {$row.case_recent_activity_type} + {$row.case_recent_activity_type} {else} {$row.case_recent_activity_type} {/if} - {if $row.case_recent_activity_editable and $row.case_recent_activity_type_name != 'Inbound Email' && $row.case_recent_activity_type_name != 'Email'}   + {if $row.case_recent_activity_editable and $row.case_recent_activity_type_name != 'Inbound Email' && $row.case_recent_activity_type_name != 'Email'}   {/if}
{$row.case_recent_activity_date|crmDate} diff --git a/templates/CRM/Contact/Form/Merge.tpl b/templates/CRM/Contact/Form/Merge.tpl index a1cea1f707..a82205402f 100644 --- a/templates/CRM/Contact/Form/Merge.tpl +++ b/templates/CRM/Contact/Form/Merge.tpl @@ -28,14 +28,24 @@ {ts}Click Merge to move data from the Duplicate Contact on the left into the Main Contact. In addition to the contact data (address, phone, email...), you may choose to move all or some of the related activity records (groups, contributions, memberships, etc.).{/ts} {help id="intro"}
-
{if $prev}{ts}<< Prev{/ts}{/if}{include file="CRM/common/formButtons.tpl" location="top"}{if $next}{ts}Next >>{/ts}{/if}
+
+ {if $prev}
{ts}Prev{/ts}
{/if} + {include file="CRM/common/formButtons.tpl" location="top"} + {if $next}
{ts}Next{/ts}
{/if} +
@@ -137,7 +147,10 @@ You will need to manually delete that user (click on the link to open Drupal Use {/if} -
{if $prev}{ts}<< Prev{/ts}{/if}{include file="CRM/common/formButtons.tpl" location="bottom"}{if $next}{ts}Next >>{/ts}{/if}
+
+ {if $prev}
{ts}Prev{/ts}
{/if} + {include file="CRM/common/formButtons.tpl" location="bottom"} + {if $next}
{ts}Next{/ts}
{/if}
{literal} diff --git a/templates/CRM/Contact/Page/DedupeFind.tpl b/templates/CRM/Contact/Page/DedupeFind.tpl index 0c9ffe1981..5925afec52 100644 --- a/templates/CRM/Contact/Page/DedupeFind.tpl +++ b/templates/CRM/Contact/Page/DedupeFind.tpl @@ -57,17 +57,23 @@ {else} {capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="reset=1&rgid=`$rgid`&action=renew" a=1}{/capture} {/if} - {ts}Refresh Duplicates{/ts} + +
{ts}Refresh Duplicates{/ts}
+
{if $gid} {capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="reset=1&rgid=`$rgid`&gid=`$gid`&action=map" a=1}{/capture} {else} {capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="reset=1&rgid=`$rgid`&action=map" a=1}{/capture} {/if} - {ts}Batch Merge Duplicates{/ts} + +
{ts}Batch Merge Duplicates{/ts}
+
{capture assign=backURL}{crmURL p="civicrm/contact/deduperules" q="reset=1" a=1}{/capture} - {ts}Done{/ts} + +
{ts}Done{/ts}
+
{/if}
{else} diff --git a/templates/CRM/Contribute/Page/PaymentInfo.tpl b/templates/CRM/Contribute/Page/PaymentInfo.tpl index 4de0054220..065f6411e8 100644 --- a/templates/CRM/Contribute/Page/PaymentInfo.tpl +++ b/templates/CRM/Contribute/Page/PaymentInfo.tpl @@ -63,7 +63,10 @@ CRM.$(function($) { diff --git a/templates/CRM/Custom/Form/Field.tpl b/templates/CRM/Custom/Form/Field.tpl index aabcdcdd31..d83bb852f6 100644 --- a/templates/CRM/Custom/Form/Field.tpl +++ b/templates/CRM/Custom/Form/Field.tpl @@ -151,7 +151,10 @@ function custom_option_html_type( ) { {/if} {if $action eq 2 and $changeFieldType}
- ( {ts}Change Input Field Type{/ts} ) + + + {ts}Change Input Field Type{/ts} +
{/if} @@ -347,6 +350,8 @@ function custom_option_html_type( ) { {* Give link to view/edit choice options if in edit mode and html_type is one of the multiple choice types *} {if $action eq 2 AND ($form.data_type.value.1.0 eq 'CheckBox' OR ($form.data_type.value.1.0 eq 'Radio' AND $form.data_type.value.0.0 neq 6) OR $form.data_type.value.1.0 eq 'Select' OR ($form.data_type.value.1.0 eq 'Multi-Select' AND $dontShowLink neq 1 ) ) } {/if} diff --git a/templates/CRM/Dashlet/Page/CaseDashboard.tpl b/templates/CRM/Dashlet/Page/CaseDashboard.tpl index ee8df7eff7..5e21f8b1e2 100644 --- a/templates/CRM/Dashlet/Page/CaseDashboard.tpl +++ b/templates/CRM/Dashlet/Page/CaseDashboard.tpl @@ -33,7 +33,9 @@ {if $newClient} {/if} diff --git a/templates/CRM/Event/Form/ParticipantFeeSelection.tpl b/templates/CRM/Event/Form/ParticipantFeeSelection.tpl index 1df9f4107f..c4aebbc2f5 100644 --- a/templates/CRM/Event/Form/ParticipantFeeSelection.tpl +++ b/templates/CRM/Event/Form/ParticipantFeeSelection.tpl @@ -139,7 +139,7 @@ CRM.$(function($) {
{ts}Total Paid{/ts}
{$paymentInfo.paid|crmMoney}
- » {ts}view payments{/ts} + {ts}view payments{/ts}
{ts}Balance Owed{/ts}
diff --git a/templates/CRM/Report/Page/Options.tpl b/templates/CRM/Report/Page/Options.tpl index 7d0d2fc229..590cd04403 100644 --- a/templates/CRM/Report/Page/Options.tpl +++ b/templates/CRM/Report/Page/Options.tpl @@ -28,7 +28,7 @@ {if $action ne 1 and $action ne 2}
{/if} @@ -74,7 +74,7 @@ {if $action ne 1 and $action ne 2} -- 2.25.1
{if $paymentInfo.paid > 0} {$paymentInfo.paid|crmMoney}
- » {ts}view payments{/ts} + + + {ts}view payments{/ts} + {/if}
{$paymentInfo.balance|crmMoney}
- » {ts}New Case{/ts} + +
{ts}New Case{/ts}
+