Merge pull request #13344 from seamuslee001/unit_test_13343
[civicrm-core.git] / settings / Contribute.setting.php
index 5bceb7424e9d151d213d1b0245501fe27702c158..7b675e036ff65d0db55250b309c3d7417a336e8c 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2017                                |
+ | Copyright CiviCRM LLC (c) 2004-2019                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2017
+ * @copyright CiviCRM LLC (c) 2004-2019
  *
  * Settings metadata file
  */
@@ -39,6 +39,7 @@ return array(
     'group' => 'contribute',
     'name' => 'cvv_backoffice_required',
     'type' => 'Boolean',
+    'html_type' => 'radio',
     'quick_form_type' => 'YesNo',
     'default' => '1',
     'add' => '4.1',
@@ -49,6 +50,8 @@ return array(
     'help_text' => 'If set it back-office credit card transactions will required a cvv code. Leave as required unless you have a very strong reason to change',
   ),
   'contribution_invoice_settings' => array(
+    // @todo our standard is to have a setting per item not to hide settings in an array with
+    // no useful metadata. Undo this setting.
     'group_name' => 'Contribute Preferences',
     'group' => 'contribute',
     'name' => 'contribution_invoice_settings',
@@ -73,7 +76,7 @@ return array(
     'group_name' => 'Contribute Preferences',
     'group' => 'contribute',
     'name' => 'invoicing',
-    'type' => 'Integer',
+    'type' => 'Boolean',
     'html_type' => 'checkbox',
     'quick_form_type' => 'Element',
     'default' => 0,
@@ -81,14 +84,15 @@ return array(
     'title' => 'Enable Tax and Invoicing',
     'is_domain' => 1,
     'is_contact' => 0,
-    'description' => NULL,
-    'help_text' => NULL,
+    'on_change' => array(
+      'CRM_Invoicing_Utils::onToggle',
+    ),
   ),
   'acl_financial_type' => array(
     'group_name' => 'Contribute Preferences',
     'group' => 'contribute',
     'name' => 'acl_financial_type',
-    'type' => 'Integer',
+    'type' => 'Boolean',
     'html_type' => 'checkbox',
     'quick_form_type' => 'Element',
     'default' => 0,
@@ -98,12 +102,13 @@ return array(
     'is_contact' => 0,
     'description' => NULL,
     'help_text' => NULL,
+    'help' => ['id' => 'acl_financial_type'],
   ),
   'deferred_revenue_enabled' => array(
     'group_name' => 'Contribute Preferences',
     'group' => 'contribute',
     'name' => 'deferred_revenue_enabled',
-    'type' => 'Integer',
+    'type' => 'Boolean',
     'html_type' => 'checkbox',
     'quick_form_type' => 'Element',
     'default' => 0,
@@ -119,7 +124,7 @@ return array(
     'group' => 'contribute',
     'name' => 'default_invoice_page',
     'type' => 'Integer',
-    'quick_form_type' => 'Element',
+    'quick_form_type' => 'Select',
     'default' => NULL,
     'pseudoconstant' => array(
       // @todo - handle table style pseudoconstants for settings & avoid deprecated function.
@@ -137,7 +142,7 @@ return array(
     'group_name' => 'Contribute Preferences',
     'group' => 'contribute',
     'name' => 'always_post_to_accounts_receivable',
-    'type' => 'Integer',
+    'type' => 'Boolean',
     'html_type' => 'checkbox',
     'quick_form_type' => 'Element',
     'default' => 0,
@@ -152,7 +157,7 @@ return array(
     'group_name' => 'Contribute Preferences',
     'group' => 'contribute',
     'name' => 'update_contribution_on_membership_type_change',
-    'type' => 'Integer',
+    'type' => 'Boolean',
     'html_type' => 'checkbox',
     'quick_form_type' => 'Element',
     'default' => 0,