<adminGroup>CiviContribute</adminGroup>
<weight>580</weight>
</item>
+ <item>
+ <path>civicrm/admin/financial/financialType/edit</path>
+ <title>Edit Financial Type</title>
+ <page_callback>CRM_Financial_Form_FinancialType</page_callback>
+ </item>
<item>
<path>civicrm/payment</path>
<title>New Payment</title>
],
CRM_Core_Action::UPDATE => [
'name' => ts('Edit'),
- 'url' => 'civicrm/admin/financial/financialType',
+ 'url' => 'civicrm/admin/financial/financialType/edit',
'qs' => 'action=update&id=%%id%%&reset=1',
'title' => ts('Edit Financial Type'),
],
],
CRM_Core_Action::DELETE => [
'name' => ts('Delete'),
- 'url' => 'civicrm/admin/financial/financialType',
+ 'url' => 'civicrm/admin/financial/financialType/edit',
'qs' => 'action=delete&id=%%id%%',
'title' => ts('Delete Financial Type'),
],
--- /dev/null
+<div af-fieldset="">
+ <div class="af-markup">
+ <div class="help">
+ <p>
+ {{:: ts('Financial types are used to categorize contributions for reporting and accounting purposes. You may set up as many as needed, including commonly used types such as Donation, Campaign Contribution or Membership Dues.') }}
+ {{:: ts('Additionally, financial types can account for the inventory and expense of premiums.') }}
+ <a href="{{ crmUrl('civicrm/admin/contribute/managePremiums') }}">{{:: ts('View Premiums') }}</a>
+ </p>
+ <p>
+ {{:: ts('Each financial type relates to a number of financial accounts to track income, accounts receivable, and fees.') }}
+ <a href="{{ crmUrl('civicrm/admin/financial/financialAccount') }}">{{:: ts('View Financial Accounts') }}</a>
+ </p>
+ </div>
+
+ </div>
+ <crm-search-display-table search-name="Administer_Financial_Types" display-name="Financial_Types_Table_1"></crm-search-display-table>
+</div>
+
+++ /dev/null
-<div af-fieldset="">
- <div class="af-markup">
- <div class="help">
- <p>{{:: ts('Financial types are used to categorize contributions for reporting and accounting purposes. You may set up as many as needed, including commonly used types such as Donation, Campaign Contribution or Membership Dues. Additionally, financial types can account for the inventory and expense of <a href="%1">premiums</a>.', {1: CRM.url('civicrm/admin/contribute/managePremiums')}) }}
- </p>
- <p>
- {{:: ts('Each financial type relates to a number of <a href="%1">financial accounts</a> to track income, accounts receivable, and fees.', {1: CRM.url('civicrm/admin/financial/financialAccount')})}}
- </p>
- </div>
-
- </div>
- <crm-search-display-table search-name="Financial_Types" display-name="Financial_Types_Table_1"></crm-search-display-table>
-</div>
-
return [
[
- 'name' => 'SavedSearch_Financial_Types',
+ 'name' => 'SavedSearch_Administer_Financial_Types',
'entity' => 'SavedSearch',
'cleanup' => 'unused',
'update' => 'unmodified',
'params' => [
'version' => 4,
'values' => [
- 'name' => 'Financial_Types',
+ 'name' => 'Administer_Financial_Types',
'label' => E::ts('Financial Types'),
'form_values' => NULL,
'mapping_id' => NULL,
'version' => 4,
'values' => [
'name' => 'Financial_Types_Table_1',
- 'label' => E::ts('Financial Types Table 1'),
- 'saved_search_id.name' => 'Financial_Types',
+ 'label' => E::ts('Administer Financial Types'),
+ 'saved_search_id.name' => 'Administer_Financial_Types',
'type' => 'table',
'settings' => [
'actions' => FALSE,
],
'pager' => [],
'placeholder' => 5,
- 'sort' => [],
+ 'sort' => [
+ [
+ 'name',
+ 'ASC',
+ ],
+ ],
'columns' => [
[
'type' => 'field',
'label' => E::ts('Description'),
'sortable' => TRUE,
'editable' => TRUE,
- 'icons' => [
- [
- 'icon' => 'fa-pencil',
- 'side' => 'left',
- 'if' => [],
- ],
- ],
],
[
'type' => 'field',
'size' => 'btn-xs',
'links' => [
[
- 'path' => '/civicrm/admin/financial/financialType/accounts?reset=1&action=browse&aid=[id]',
+ 'path' => 'civicrm/admin/financial/financialType/accounts?reset=1&action=browse&aid=[id]',
'icon' => '',
'text' => E::ts('Accounts'),
'style' => 'default',
'join' => '',
'target' => '',
],
- ],
- 'type' => 'buttons',
- 'alignment' => 'text-right',
- ],
- [
- 'size' => 'btn-sm',
- 'links' => [
[
- 'path' => '/civicrm/admin/financial/financialType?action=update&id=[id]&reset=1',
'icon' => 'fa-pencil',
'text' => E::ts('Edit'),
'style' => 'default',
'condition' => [],
- 'entity' => '',
- 'action' => '',
+ 'entity' => 'FinancialType',
+ 'action' => 'update',
'join' => '',
- 'target' => '',
+ 'target' => 'crm-popup',
],
- ],
- 'type' => 'buttons',
- 'alignment' => 'text-right',
- ],
- [
- 'size' => 'btn-sm',
- 'links' => [
[
- 'path' => '/civicrm/admin/financial/financialType?action=delete&id=[id]',
- 'icon' => 'fa-trash-o',
+ 'icon' => 'fa-trash',
'text' => E::ts('Delete'),
'style' => 'danger',
'condition' => [],
- 'entity' => '',
- 'action' => '',
+ 'entity' => 'FinancialType',
+ 'action' => 'delete',
'join' => '',
- 'target' => '',
+ 'target' => 'crm-popup',
],
],
'type' => 'buttons',
],
],
'addButton' => [
- 'path' => 'civicrm/admin/financial/financialType/accounts?reset=1&action=add',
+ 'path' => 'civicrm/admin/financial/financialType/edit?reset=1&action=add',
'text' => E::ts('Add Financial Type'),
'icon' => 'fa-plus',
],
+ 'cssRules' => [
+ [
+ 'disabled',
+ 'is_active',
+ '=',
+ FALSE,
+ ],
+ ],
],
'acl_bypass' => FALSE,
],
{if $action ne 1 and $action ne 2}
<div class="action-link">
{crmButton q="action=add&reset=1&aid=$aid" id="newfinancialTypeAccount" icon="plus-circle"}{ts}Assign Account{/ts}{/crmButton}
- {crmButton p="civicrm/admin/financial/financialType" q="action=update&id=`$aid`&reset=1" icon="pencil"}{ts}Edit Financial Type{/ts}{/crmButton}
+ {crmButton p="civicrm/admin/financial/financialType/edit" q="action=update&id=`$aid`&reset=1" icon="pencil"}{ts}Edit Financial Type{/ts}{/crmButton}
</div>
{/if}
{strip}
{if $action ne 1 and $action ne 2}
<div class="action-link">
{crmButton q="action=add&reset=1&aid=$aid" id="newfinancialTypeAccount" icon="plus-circle"}{ts}Assign Account{/ts}{/crmButton}
- {crmButton p="civicrm/admin/financial/financialType" q="action=update&id=`$aid`&reset=1" icon="pencil"}{ts}Edit Financial Type{/ts}{/crmButton}
+ {crmButton p="civicrm/admin/financial/financialType/edit" q="action=update&id=`$aid`&reset=1" icon="pencil"}{ts}Edit Financial Type{/ts}{/crmButton}
</div>
{/if}
</div>