From: Coleman Watts Date: Wed, 21 Jan 2015 21:01:01 +0000 (-0500) Subject: CRM-15789 - Put {crmButton} into general use X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f7296a9a227d5bdfbd81dadb5dde283d5ea2853e;p=civicrm-core.git CRM-15789 - Put {crmButton} into general use ---------------------------------------- * CRM-15789: Add icons to submit buttons https://issues.civicrm.org/jira/browse/CRM-15789 --- diff --git a/templates/CRM/ACL/Page/ACL.tpl b/templates/CRM/ACL/Page/ACL.tpl index 79ac8e8863..2cb74e2865 100644 --- a/templates/CRM/ACL/Page/ACL.tpl +++ b/templates/CRM/ACL/Page/ACL.tpl @@ -74,7 +74,7 @@ {if $action ne 1 and $action ne 2} {/if} diff --git a/templates/CRM/ACL/Page/EntityRole.tpl b/templates/CRM/ACL/Page/EntityRole.tpl index b9f777dcc0..cea9403af4 100644 --- a/templates/CRM/ACL/Page/EntityRole.tpl +++ b/templates/CRM/ACL/Page/EntityRole.tpl @@ -67,7 +67,7 @@ {if $action ne 1 and $action ne 2}
-
{ts}Add Role Assignment{/ts}
+ {crmButton q="action=add&reset=1" id="newACL" icon="circle-plus"}{ts}Add Role Assignment{/ts}{/crmButton}
{/if} diff --git a/templates/CRM/Admin/Page/ContactType.tpl b/templates/CRM/Admin/Page/ContactType.tpl index 3f58132220..4f16d9866e 100644 --- a/templates/CRM/Admin/Page/ContactType.tpl +++ b/templates/CRM/Admin/Page/ContactType.tpl @@ -63,7 +63,7 @@ {/if} {/if} diff --git a/templates/CRM/Admin/Page/EventTemplate.tpl b/templates/CRM/Admin/Page/EventTemplate.tpl index 3d768947bc..3afc0b48ba 100644 --- a/templates/CRM/Admin/Page/EventTemplate.tpl +++ b/templates/CRM/Admin/Page/EventTemplate.tpl @@ -30,8 +30,7 @@
{if $action ne 1 and $action ne 2} {/if} diff --git a/templates/CRM/Admin/Page/Extensions/Refresh.tpl b/templates/CRM/Admin/Page/Extensions/Refresh.tpl index 3b31575e3b..c13518e7f4 100644 --- a/templates/CRM/Admin/Page/Extensions/Refresh.tpl +++ b/templates/CRM/Admin/Page/Extensions/Refresh.tpl @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/templates/CRM/Admin/Page/Job.tpl b/templates/CRM/Admin/Page/Job.tpl index 35fe4c35ac..947dc6c1b5 100644 --- a/templates/CRM/Admin/Page/Job.tpl +++ b/templates/CRM/Admin/Page/Job.tpl @@ -36,8 +36,8 @@ {if $action ne 1 and $action ne 2} {/if} diff --git a/templates/CRM/Admin/Page/LocationType.tpl b/templates/CRM/Admin/Page/LocationType.tpl index 9e2751c58b..d421d1fe05 100644 --- a/templates/CRM/Admin/Page/LocationType.tpl +++ b/templates/CRM/Admin/Page/LocationType.tpl @@ -69,7 +69,7 @@
{/if} {/if} diff --git a/templates/CRM/Admin/Page/MailSettings.tpl b/templates/CRM/Admin/Page/MailSettings.tpl index 12e17cf253..939dc91c16 100644 --- a/templates/CRM/Admin/Page/MailSettings.tpl +++ b/templates/CRM/Admin/Page/MailSettings.tpl @@ -75,7 +75,7 @@ {/if} {/if} diff --git a/templates/CRM/Admin/Page/MessageTemplates.tpl b/templates/CRM/Admin/Page/MessageTemplates.tpl index 83f40a3d51..13f5d8bbb3 100644 --- a/templates/CRM/Admin/Page/MessageTemplates.tpl +++ b/templates/CRM/Admin/Page/MessageTemplates.tpl @@ -140,7 +140,7 @@ {if $action ne 1 and $action ne 2 and $type eq 'userTemplates'}
{/if} diff --git a/templates/CRM/Admin/Page/OptionGroup.tpl b/templates/CRM/Admin/Page/OptionGroup.tpl index 038b981c42..2fb2ea86ec 100644 --- a/templates/CRM/Admin/Page/OptionGroup.tpl +++ b/templates/CRM/Admin/Page/OptionGroup.tpl @@ -57,8 +57,8 @@ {if $action ne 1 and $action ne 2} {/if} diff --git a/templates/CRM/Admin/Page/Options.tpl b/templates/CRM/Admin/Page/Options.tpl index e37661af01..ed4b986c88 100644 --- a/templates/CRM/Admin/Page/Options.tpl +++ b/templates/CRM/Admin/Page/Options.tpl @@ -74,7 +74,7 @@ {if $rows} {if $isLocked ne 1} {/if}
@@ -160,9 +160,9 @@ {/if}
{/if} diff --git a/templates/CRM/Admin/Page/ParticipantStatusType.tpl b/templates/CRM/Admin/Page/ParticipantStatusType.tpl index 24ad63e4c0..696977d358 100644 --- a/templates/CRM/Admin/Page/ParticipantStatusType.tpl +++ b/templates/CRM/Admin/Page/ParticipantStatusType.tpl @@ -62,8 +62,8 @@ {if $action ne 1 and $action ne 2} {/if} diff --git a/templates/CRM/Admin/Page/PaymentProcessor.tpl b/templates/CRM/Admin/Page/PaymentProcessor.tpl index 2e26d912db..a811acd24c 100644 --- a/templates/CRM/Admin/Page/PaymentProcessor.tpl +++ b/templates/CRM/Admin/Page/PaymentProcessor.tpl @@ -62,7 +62,7 @@ {if $action ne 1 and $action ne 2} {/if} @@ -72,7 +72,7 @@ {ts}There are no Payment Processors entered.{/ts} {/if} {/if} diff --git a/templates/CRM/Admin/Page/PaymentProcessorType.tpl b/templates/CRM/Admin/Page/PaymentProcessorType.tpl index 4697f1280c..7f8d240835 100644 --- a/templates/CRM/Admin/Page/PaymentProcessorType.tpl +++ b/templates/CRM/Admin/Page/PaymentProcessorType.tpl @@ -62,7 +62,7 @@ {if $action ne 1 and $action ne 2} {/if} diff --git a/templates/CRM/Admin/Page/PdfFormats.tpl b/templates/CRM/Admin/Page/PdfFormats.tpl index 5269d73c20..c54ed251e8 100644 --- a/templates/CRM/Admin/Page/PdfFormats.tpl +++ b/templates/CRM/Admin/Page/PdfFormats.tpl @@ -65,7 +65,7 @@ {/if}
{/if} diff --git a/templates/CRM/Admin/Page/Persistent.tpl b/templates/CRM/Admin/Page/Persistent.tpl index 85e70d2b2a..bac43642be 100644 --- a/templates/CRM/Admin/Page/Persistent.tpl +++ b/templates/CRM/Admin/Page/Persistent.tpl @@ -2,11 +2,7 @@ {if $type eq 'configTemplates'} {if !empty( $template_row) } @@ -37,11 +33,7 @@

{if !empty( $template_row) } diff --git a/templates/CRM/Admin/Page/RelationshipType.tpl b/templates/CRM/Admin/Page/RelationshipType.tpl index 58652ada11..2c06e8d9ec 100644 --- a/templates/CRM/Admin/Page/RelationshipType.tpl +++ b/templates/CRM/Admin/Page/RelationshipType.tpl @@ -36,7 +36,7 @@ {if $rows} {if !($action eq 1 and $action eq 2)} {/if} @@ -82,7 +82,7 @@ {/if} {/if} diff --git a/templates/CRM/Admin/Page/ScheduleReminders.tpl b/templates/CRM/Admin/Page/ScheduleReminders.tpl index c6b5b7aa12..7f6cb7eaba 100644 --- a/templates/CRM/Admin/Page/ScheduleReminders.tpl +++ b/templates/CRM/Admin/Page/ScheduleReminders.tpl @@ -58,7 +58,7 @@ {else} {assign var='urlParams' value="action=add&reset=1"} {/if} -
{ts}Add Reminder{/ts}
+ {crmButton p=$link q=$urlParams id="newScheduleReminder" icon="circle-plus"}{ts}Add Reminder{/ts}{/crmButton} {/if} {/if} diff --git a/templates/CRM/Admin/Page/Tag.tpl b/templates/CRM/Admin/Page/Tag.tpl index 909bba7460..b3e88ee413 100644 --- a/templates/CRM/Admin/Page/Tag.tpl +++ b/templates/CRM/Admin/Page/Tag.tpl @@ -38,9 +38,9 @@ {if !($action eq 1 and $action eq 2)}
@@ -81,9 +81,9 @@ {if !($action eq 1 and $action eq 2)}
diff --git a/templates/CRM/Campaign/Form/Search/Petition.tpl b/templates/CRM/Campaign/Form/Search/Petition.tpl index 0007b361bc..cd0e32f6fc 100755 --- a/templates/CRM/Campaign/Form/Search/Petition.tpl +++ b/templates/CRM/Campaign/Form/Search/Petition.tpl @@ -31,7 +31,7 @@ {elseif $buildSelector} @@ -72,7 +72,7 @@ {else} {* build search form here *} diff --git a/templates/CRM/Campaign/Form/Search/Survey.tpl b/templates/CRM/Campaign/Form/Search/Survey.tpl index 0947af09ad..7740b3c652 100755 --- a/templates/CRM/Campaign/Form/Search/Survey.tpl +++ b/templates/CRM/Campaign/Form/Search/Survey.tpl @@ -31,7 +31,7 @@ {elseif $buildSelector} @@ -76,7 +76,7 @@ {else} {* build search form here *} diff --git a/templates/CRM/Case/Form/CaseView.tpl b/templates/CRM/Case/Form/CaseView.tpl index 0cd707c289..48add0ae57 100644 --- a/templates/CRM/Case/Form/CaseView.tpl +++ b/templates/CRM/Case/Form/CaseView.tpl @@ -250,12 +250,10 @@ {ts}Other Relationships{/ts}
- {capture assign=relUrl}{crmURL p='civicrm/contact/view/rel' q="action=add&reset=1&cid=`$contactId`&caseID=`$caseID`"}{/capture} +
+ {crmButton p='civicrm/contact/view/rel' q="action=add&reset=1&cid=`$contactId`&caseID=`$caseID`" icon="circle-plus"}{ts}Add client relationship{/ts}{/crmButton} +
{if $clientRelationships} -
@@ -267,8 +265,7 @@ {else}
- {capture assign=link}class="action-item" href="{$relUrl}"{/capture} - {ts 1=$link}There are no Relationships entered for this client. You can add one.{/ts} + {ts}None found.{/ts}
{/if} {literal} diff --git a/templates/CRM/Case/Page/CustomDataView.tpl b/templates/CRM/Case/Page/CustomDataView.tpl index bc9b41918c..2940e4e9e6 100644 --- a/templates/CRM/Case/Page/CustomDataView.tpl +++ b/templates/CRM/Case/Page/CustomDataView.tpl @@ -69,9 +69,7 @@
{ts}Client Relationship{/ts}
{/foreach}
- -
{ts}Edit{/ts}
-
+ {crmButton p="civicrm/case/cd/edit" q="cgcount=1&action=update&reset=1&type=Case&entityID=$caseID&groupID=$customGroupId&cid=$contactID&subType=$caseTypeID" icon="pencil"}{ts}Edit{/ts}{/crmButton}

diff --git a/templates/CRM/Contact/Page/DedupeRules.tpl b/templates/CRM/Contact/Page/DedupeRules.tpl index 0217632c61..04d3bda3fc 100644 --- a/templates/CRM/Contact/Page/DedupeRules.tpl +++ b/templates/CRM/Contact/Page/DedupeRules.tpl @@ -61,7 +61,7 @@ {/strip}
-
{ts 1=$contactType}Add Rule for %1s{/ts}
+ {crmButton q="action=add&contact_type=$contactType&reset=1" icon="circle-plus"}{ts 1=$contactType}Add Rule for %1s{/ts}{/crmButton}
{/foreach} diff --git a/templates/CRM/Contact/Page/View/Relationship.tpl b/templates/CRM/Contact/Page/View/Relationship.tpl index cba2e0d2dd..3a3083d9d8 100644 --- a/templates/CRM/Contact/Page/View/Relationship.tpl +++ b/templates/CRM/Contact/Page/View/Relationship.tpl @@ -32,8 +32,7 @@
{if $permission EQ 'edit'} {/if} diff --git a/templates/CRM/Contribute/Page/ContributionType.tpl b/templates/CRM/Contribute/Page/ContributionType.tpl index f5002ae7b4..4abef5d6ff 100644 --- a/templates/CRM/Contribute/Page/ContributionType.tpl +++ b/templates/CRM/Contribute/Page/ContributionType.tpl @@ -71,8 +71,8 @@ {/if} {if $action ne 1 and $action ne 2} {/if} {/if} diff --git a/templates/CRM/Contribute/Page/ManagePremiums.tpl b/templates/CRM/Contribute/Page/ManagePremiums.tpl index 433717b2f6..32a826a97e 100644 --- a/templates/CRM/Contribute/Page/ManagePremiums.tpl +++ b/templates/CRM/Contribute/Page/ManagePremiums.tpl @@ -71,7 +71,7 @@ {/strip} {if $action ne 1 and $action ne 2} {/if}
diff --git a/templates/CRM/Custom/Form/Field.tpl b/templates/CRM/Custom/Form/Field.tpl index 9a7f25297c..5b463bfced 100644 --- a/templates/CRM/Custom/Form/Field.tpl +++ b/templates/CRM/Custom/Form/Field.tpl @@ -349,8 +349,6 @@ 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/Custom/Form/Group.tpl b/templates/CRM/Custom/Form/Group.tpl index 1908d6631b..7564379560 100644 --- a/templates/CRM/Custom/Form/Group.tpl +++ b/templates/CRM/Custom/Form/Group.tpl @@ -78,7 +78,7 @@ {if $action eq 2 or $action eq 4} {* Update or View*}

{/if} {$initHideBlocks} diff --git a/templates/CRM/Custom/Page/Field.tpl b/templates/CRM/Custom/Page/Field.tpl index c19f3cb072..933c3be8c5 100644 --- a/templates/CRM/Custom/Page/Field.tpl +++ b/templates/CRM/Custom/Page/Field.tpl @@ -77,8 +77,8 @@ {/if} {/if} {/if} diff --git a/templates/CRM/Custom/Page/Group.tpl b/templates/CRM/Custom/Page/Group.tpl index 856fce896e..29f3298cd2 100644 --- a/templates/CRM/Custom/Page/Group.tpl +++ b/templates/CRM/Custom/Page/Group.tpl @@ -70,7 +70,7 @@ {if NOT ($action eq 1 or $action eq 2) } {/if} diff --git a/templates/CRM/Custom/Page/Option.tpl b/templates/CRM/Custom/Page/Option.tpl index 301c38d537..697cd93e63 100644 --- a/templates/CRM/Custom/Page/Option.tpl +++ b/templates/CRM/Custom/Page/Option.tpl @@ -62,8 +62,8 @@ {/strip} diff --git a/templates/CRM/Financial/Page/FinancialType.tpl b/templates/CRM/Financial/Page/FinancialType.tpl index 7b1cc812e0..8ae441acc3 100644 --- a/templates/CRM/Financial/Page/FinancialType.tpl +++ b/templates/CRM/Financial/Page/FinancialType.tpl @@ -74,8 +74,8 @@ {/if} {if $action ne 1 and $action ne 2} {/if} {/if} diff --git a/templates/CRM/Financial/Page/FinancialTypeAccount.tpl b/templates/CRM/Financial/Page/FinancialTypeAccount.tpl index 12808180fb..1315f4dbc6 100644 --- a/templates/CRM/Financial/Page/FinancialTypeAccount.tpl +++ b/templates/CRM/Financial/Page/FinancialTypeAccount.tpl @@ -31,8 +31,8 @@
{if $action ne 1 and $action ne 2} {/if} {strip} @@ -64,8 +64,8 @@ {if $action ne 1 and $action ne 2} {/if}
diff --git a/templates/CRM/Mailing/Page/Browse.tpl b/templates/CRM/Mailing/Page/Browse.tpl index d161345813..19086374b4 100644 --- a/templates/CRM/Mailing/Page/Browse.tpl +++ b/templates/CRM/Mailing/Page/Browse.tpl @@ -37,7 +37,7 @@ {if $showLinks} {/if} {include file="CRM/Mailing/Form/Search.tpl"} @@ -84,7 +84,7 @@ {include file="CRM/common/pager.tpl" location="bottom"} {if $showLinks} {/if} diff --git a/templates/CRM/Mailing/Page/Component.tpl b/templates/CRM/Mailing/Page/Component.tpl index a0a2cdcb75..f009e9c555 100644 --- a/templates/CRM/Mailing/Page/Component.tpl +++ b/templates/CRM/Mailing/Page/Component.tpl @@ -62,7 +62,7 @@ {if $action ne 1 and $action ne 2}
{/if} diff --git a/templates/CRM/Member/Page/MembershipStatus.tpl b/templates/CRM/Member/Page/MembershipStatus.tpl index 78809c529e..c0d730188d 100644 --- a/templates/CRM/Member/Page/MembershipStatus.tpl +++ b/templates/CRM/Member/Page/MembershipStatus.tpl @@ -67,8 +67,8 @@ {if $action ne 1 and $action ne 2} {/if} diff --git a/templates/CRM/Member/Page/MembershipType.tpl b/templates/CRM/Member/Page/MembershipType.tpl index 8f60dbd1c3..c23342aae9 100644 --- a/templates/CRM/Member/Page/MembershipType.tpl +++ b/templates/CRM/Member/Page/MembershipType.tpl @@ -73,7 +73,7 @@ {if $action ne 1 and $action ne 2} {/if} diff --git a/templates/CRM/Price/Page/Field.tpl b/templates/CRM/Price/Page/Field.tpl index caea3f9060..550c6acd91 100644 --- a/templates/CRM/Price/Page/Field.tpl +++ b/templates/CRM/Price/Page/Field.tpl @@ -45,9 +45,9 @@ {if $action NEQ 8 and $priceField}
{strip} @@ -96,9 +96,9 @@
{else} @@ -108,7 +108,7 @@ {ts}None found.{/ts} {/if} {/if} diff --git a/templates/CRM/Price/Page/Option.tpl b/templates/CRM/Price/Page/Option.tpl index 1f4c8273eb..1030129b94 100644 --- a/templates/CRM/Price/Page/Option.tpl +++ b/templates/CRM/Price/Page/Option.tpl @@ -99,8 +99,8 @@ {/if} {if $addMoreFields && !$isReserved} {/if} {/if} diff --git a/templates/CRM/Price/Page/Set.tpl b/templates/CRM/Price/Page/Set.tpl index 550b1e25e2..f7f4058246 100644 --- a/templates/CRM/Price/Page/Set.tpl +++ b/templates/CRM/Price/Page/Set.tpl @@ -76,7 +76,7 @@ {if NOT ($action eq 1 or $action eq 2) } {/if} diff --git a/templates/CRM/SMS/Page/Provider.tpl b/templates/CRM/SMS/Page/Provider.tpl index fffb2c2598..8826f2107f 100644 --- a/templates/CRM/SMS/Page/Provider.tpl +++ b/templates/CRM/SMS/Page/Provider.tpl @@ -68,6 +68,6 @@ {/if} {/if} diff --git a/templates/CRM/UF/Page/Field.tpl b/templates/CRM/UF/Page/Field.tpl index 85876281fc..7494571bd3 100644 --- a/templates/CRM/UF/Page/Field.tpl +++ b/templates/CRM/UF/Page/Field.tpl @@ -37,7 +37,7 @@
{if not ($action eq 2 or $action eq 1)} {/if} @@ -79,7 +79,7 @@ {/strip} {if not ($action eq 2 or $action eq 1)} {/if} @@ -93,7 +93,7 @@ {ts}None found.{/ts}
{/if} {/if}