From 41a04da094b74c7dae88f89a024cc960745df420 Mon Sep 17 00:00:00 2001 From: Kevin Cristiano <kcristiano@kcristiano.com> Date: Sun, 13 Dec 2020 14:28:28 -0500 Subject: [PATCH] civicrm release --- civicrm.php | 4 +- .../CRM/Contribute/Form/Contribution/Main.php | 7 ++ civicrm/CRM/Event/Form/Participant.php | 7 ++ .../CRM/Event/Form/Registration/Register.php | 9 +++ civicrm/CRM/Event/Form/Task/Register.php | 8 +- civicrm/CRM/Event/Page/Tab.php | 4 +- civicrm/CRM/Export/BAO/ExportProcessor.php | 8 +- civicrm/CRM/Upgrade/DispatchPolicy.php | 4 + civicrm/CRM/Upgrade/Form.php | 2 + .../Upgrade/Incremental/sql/5.32.2.mysql.tpl | 1 + civicrm/civicrm-version.php | 2 +- civicrm/ext/financialacls/financialacls.php | 78 ++++++++++++------- civicrm/release-notes.md | 9 +++ civicrm/release-notes/5.32.2.md | 43 ++++++++++ civicrm/sql/civicrm_data.mysql | 2 +- civicrm/sql/civicrm_generated.mysql | 2 +- .../CRM/Event/Form/Task/Register.tpl | 12 +++ .../templates/CRM/Price/Form/Calculate.tpl | 13 +++- civicrm/vendor/autoload.php | 2 +- civicrm/vendor/composer/autoload_real.php | 14 ++-- civicrm/vendor/composer/autoload_static.php | 12 +-- civicrm/xml/version.xml | 2 +- 22 files changed, 188 insertions(+), 57 deletions(-) create mode 100644 civicrm/CRM/Upgrade/Incremental/sql/5.32.2.mysql.tpl create mode 100644 civicrm/release-notes/5.32.2.md create mode 100644 civicrm/templates/CRM/Event/Form/Task/Register.tpl diff --git a/civicrm.php b/civicrm.php index 76cdcfa7f1..fa6539fe36 100644 --- a/civicrm.php +++ b/civicrm.php @@ -2,7 +2,7 @@ /* Plugin Name: CiviCRM Description: CiviCRM - Growing and Sustaining Relationships -Version: 5.32.1 +Version: 5.32.2 Requires at least: 4.9 Requires PHP: 7.1 Author: CiviCRM LLC @@ -56,7 +56,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Set version here: when it changes, will force JS to reload -define( 'CIVICRM_PLUGIN_VERSION', '5.32.1' ); +define( 'CIVICRM_PLUGIN_VERSION', '5.32.2' ); // Store reference to this file if (!defined('CIVICRM_PLUGIN_FILE')) { diff --git a/civicrm/CRM/Contribute/Form/Contribution/Main.php b/civicrm/CRM/Contribute/Form/Contribution/Main.php index 6ff333e145..fa76918ee7 100644 --- a/civicrm/CRM/Contribute/Form/Contribution/Main.php +++ b/civicrm/CRM/Contribute/Form/Contribution/Main.php @@ -58,6 +58,13 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu $this->assign('isShare', CRM_Utils_Array::value('is_share', $this->_values)); $this->assign('isConfirmEnabled', CRM_Utils_Array::value('is_confirm_enabled', $this->_values)); + // Required for currency formatting in the JS layer + // this is a temporary fix intended to resolve a regression quickly + // And assigning moneyFormat for js layer formatting + // will only work until that is done. + // https://github.com/civicrm/civicrm-core/pull/19151 + $this->assign('moneyFormat', CRM_Utils_Money::format(1234.56)); + $this->assign('reset', CRM_Utils_Request::retrieve('reset', 'Boolean')); $this->assign('mainDisplay', CRM_Utils_Request::retrieve('_qf_Main_display', 'Boolean', CRM_Core_DAO::$_nullObject)); diff --git a/civicrm/CRM/Event/Form/Participant.php b/civicrm/CRM/Event/Form/Participant.php index 71c3204b8c..a4a1a4258d 100644 --- a/civicrm/CRM/Event/Form/Participant.php +++ b/civicrm/CRM/Event/Form/Participant.php @@ -367,6 +367,9 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment // when fee amount is included in form if (!empty($_POST['hidden_feeblock']) || !empty($_POST['send_receipt'])) { + if ($this->_submitValues['event_id']) { + $this->_eventId = $this->_submitValues['event_id']; + } CRM_Event_Form_EventFees::preProcess($this); $this->buildEventFeeForm($this); CRM_Event_Form_EventFees::setDefaultValues($this); @@ -2296,6 +2299,10 @@ INNER JOIN civicrm_price_field_value value ON ( value.id = lineItem.price_field_ CRM_Utils_System::appendBreadCrumb($breadCrumbs); } + else { + $this->assign('id', $this->_id); + $this->assign('contact_id', $this->_contactId); + } } } diff --git a/civicrm/CRM/Event/Form/Registration/Register.php b/civicrm/CRM/Event/Form/Registration/Register.php index 5d39b2a126..059c07ec69 100644 --- a/civicrm/CRM/Event/Form/Registration/Register.php +++ b/civicrm/CRM/Event/Form/Registration/Register.php @@ -319,6 +319,15 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { // CRM-18399: used by template to pass pre profile id as a url arg $this->assign('custom_pre_id', $this->_values['custom_pre_id']); + // Required for currency formatting in the JS layer + + // Required for currency formatting in the JS layer + // this is a temporary fix intended to resolve a regression quickly + // And assigning moneyFormat for js layer formatting + // will only work until that is done. + // https://github.com/civicrm/civicrm-core/pull/19151 + $this->assign('moneyFormat', CRM_Utils_Money::format(1234.56)); + CRM_Core_Payment_ProcessorForm::buildQuickForm($this); $contactID = $this->getContactID(); diff --git a/civicrm/CRM/Event/Form/Task/Register.php b/civicrm/CRM/Event/Form/Task/Register.php index b13a5619db..6bdcb8ae20 100644 --- a/civicrm/CRM/Event/Form/Task/Register.php +++ b/civicrm/CRM/Event/Form/Task/Register.php @@ -71,8 +71,12 @@ class CRM_Event_Form_Task_Register extends CRM_Event_Form_Participant { $this->_contactId = NULL; //set ajax path, this used for custom data building - $this->assign('urlPath', $urlString); - $this->assign('urlPathVar', "_qf_Participant_display=true&qfKey={$this->controller->_key}"); + $this->assign('urlPath', 'civicrm/contact/view/participant'); + + $key = CRM_Core_Key::get('CRM_Event_Form_Participant', TRUE); + $this->assign('participantQfKey', $key); + $this->assign('participantAction', CRM_Core_Action::ADD); + $this->assign('urlPathVar', "_qf_Participant_display=true&context=search"); } } diff --git a/civicrm/CRM/Event/Page/Tab.php b/civicrm/CRM/Event/Page/Tab.php index 0ecd0f8063..ef08087eaf 100644 --- a/civicrm/CRM/Event/Page/Tab.php +++ b/civicrm/CRM/Event/Page/Tab.php @@ -118,11 +118,11 @@ class CRM_Event_Page_Tab extends CRM_Core_Page { $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this); - if ($context == 'standalone') { + if (($context == 'standalone' || $context === 'search') && $this->_action !== CRM_Core_Action::VIEW) { $this->_action = CRM_Core_Action::ADD; } else { - $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE); + $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this); $this->assign('contactId', $this->_contactId); // check logged in url permission diff --git a/civicrm/CRM/Export/BAO/ExportProcessor.php b/civicrm/CRM/Export/BAO/ExportProcessor.php index ab63f36eea..11e26f65ed 100644 --- a/civicrm/CRM/Export/BAO/ExportProcessor.php +++ b/civicrm/CRM/Export/BAO/ExportProcessor.php @@ -797,12 +797,12 @@ class CRM_Export_BAO_ExportProcessor { list($select, $from, $where, $having) = $query->query(); $this->setQueryFields($query->_fields); $whereClauses = ['trash_clause' => "contact_a.is_deleted != 1"]; - if ($this->getRequestedFields() && $this->getComponentTable() && $this->getComponentTable() !== 'civicrm_contact') { - $from .= " INNER JOIN " . $this->getComponentTable() . " ctTable ON ctTable.contact_id = contact_a.id "; - } - elseif ($this->getComponentClause()) { + if ($this->getComponentClause()) { $whereClauses[] = $this->getComponentClause(); } + elseif ($this->getRequestedFields() && $this->getComponentTable() && $this->getComponentTable() !== 'civicrm_contact') { + $from .= " INNER JOIN " . $this->getComponentTable() . " ctTable ON ctTable.contact_id = contact_a.id "; + } // CRM-13982 - check if is deleted foreach ($params as $value) { diff --git a/civicrm/CRM/Upgrade/DispatchPolicy.php b/civicrm/CRM/Upgrade/DispatchPolicy.php index de0fa72511..a67c17e2ae 100644 --- a/civicrm/CRM/Upgrade/DispatchPolicy.php +++ b/civicrm/CRM/Upgrade/DispatchPolicy.php @@ -59,6 +59,10 @@ class CRM_Upgrade_DispatchPolicy { // It's more restrictive, preventing interference from unexpected callpaths. $policies['upgrade.main'] = [ 'hook_civicrm_config' => 'run', + 'hook_civicrm_container' => 'run', + 'hook_civicrm_alterSettingsFolders' => 'run', + 'hook_civicrm_alterSettingsMetaData' => 'run', + 'hook_civicrm_permission' => 'run', '/^hook_civicrm_(pre|post)$/' => 'drop', '/^hook_civicrm_/' => $strict ? 'warn-drop' : 'drop', '/^civi\./' => 'run', diff --git a/civicrm/CRM/Upgrade/Form.php b/civicrm/CRM/Upgrade/Form.php index 2ab3c1c7e8..5fb36b6475 100644 --- a/civicrm/CRM/Upgrade/Form.php +++ b/civicrm/CRM/Upgrade/Form.php @@ -780,6 +780,8 @@ SET version = '$version' // Rebuild all triggers and re-enable logging if needed $logging = new CRM_Logging_Schema(); $logging->fixSchemaDifferences(); + // Force a rebuild of CiviCRM asset cache in case things have changed. + \Civi::service('asset_builder')->clear(FALSE); } /** diff --git a/civicrm/CRM/Upgrade/Incremental/sql/5.32.2.mysql.tpl b/civicrm/CRM/Upgrade/Incremental/sql/5.32.2.mysql.tpl new file mode 100644 index 0000000000..fac5a9e494 --- /dev/null +++ b/civicrm/CRM/Upgrade/Incremental/sql/5.32.2.mysql.tpl @@ -0,0 +1 @@ +{* file to handle db changes in 5.32.2 during upgrade *} diff --git a/civicrm/civicrm-version.php b/civicrm/civicrm-version.php index 665fbd1b97..0030bb3bfc 100644 --- a/civicrm/civicrm-version.php +++ b/civicrm/civicrm-version.php @@ -1,7 +1,7 @@ <?php /** @deprecated */ function civicrmVersion( ) { - return array( 'version' => '5.32.1', + return array( 'version' => '5.32.2', 'cms' => 'Wordpress', 'revision' => '' ); } diff --git a/civicrm/ext/financialacls/financialacls.php b/civicrm/ext/financialacls/financialacls.php index c039ef1998..4bcb999030 100644 --- a/civicrm/ext/financialacls/financialacls.php +++ b/civicrm/ext/financialacls/financialacls.php @@ -155,16 +155,17 @@ function financialacls_civicrm_themes(&$themes) { * @throws \CRM_Core_Exception */ function financialacls_civicrm_pre($op, $objectName, $id, &$params) { + if (!financialacls_is_acl_limiting_enabled()) { + return; + } if ($objectName === 'LineItem' && !empty($params['check_permissions'])) { - if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) { - $operationMap = ['delete' => CRM_Core_Action::DELETE, 'edit' => CRM_Core_Action::UPDATE, 'create' => CRM_Core_Action::ADD]; - CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($types, $operationMap[$op]); - if (empty($params['financial_type_id'])) { - $params['financial_type_id'] = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_LineItem', $params['id'], 'financial_type_id'); - } - if (!in_array($params['financial_type_id'], array_keys($types))) { - throw new API_Exception('You do not have permission to ' . $op . ' this line item'); - } + $operationMap = ['delete' => CRM_Core_Action::DELETE, 'edit' => CRM_Core_Action::UPDATE, 'create' => CRM_Core_Action::ADD]; + CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($types, $operationMap[$op]); + if (empty($params['financial_type_id'])) { + $params['financial_type_id'] = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_LineItem', $params['id'], 'financial_type_id'); + } + if (!in_array($params['financial_type_id'], array_keys($types))) { + throw new API_Exception('You do not have permission to ' . $op . ' this line item'); } } } @@ -175,23 +176,24 @@ function financialacls_civicrm_pre($op, $objectName, $id, &$params) { * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_selectWhereClause */ function financialacls_civicrm_selectWhereClause($entity, &$clauses) { + if (!financialacls_is_acl_limiting_enabled()) { + return; + } if ($entity === 'LineItem') { - if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) { - $types = []; - CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($types); - if ($types) { - $clauses['financial_type_id'] = 'IN (' . implode(',', array_keys($types)) . ')'; - } - else { - $clauses['financial_type_id'] = '= 0'; - } + $types = []; + CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($types); + if ($types) { + $clauses['financial_type_id'] = 'IN (' . implode(',', array_keys($types)) . ')'; + } + else { + $clauses['financial_type_id'] = '= 0'; } } } /** - * Remove un. + * Remove unpermitted options. * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildAmount * @@ -200,17 +202,19 @@ function financialacls_civicrm_selectWhereClause($entity, &$clauses) { * @param array $feeBlock */ function financialacls_civicrm_buildAmount($component, $form, &$feeBlock) { - if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus()) { - foreach ($feeBlock as $key => $value) { - foreach ($value['options'] as $k => $options) { - if (!CRM_Core_Permission::check('add contributions of type ' . CRM_Contribute_PseudoConstant::financialType($options['financial_type_id']))) { - unset($feeBlock[$key]['options'][$k]); - } - } - if (empty($feeBlock[$key]['options'])) { - unset($feeBlock[$key]); + if (!financialacls_is_acl_limiting_enabled()) { + return; + } + + foreach ($feeBlock as $key => $value) { + foreach ($value['options'] as $k => $options) { + if (!CRM_Core_Permission::check('add contributions of type ' . CRM_Contribute_PseudoConstant::financialType($options['financial_type_id']))) { + unset($feeBlock[$key]['options'][$k]); } } + if (empty($feeBlock[$key]['options'])) { + unset($feeBlock[$key]); + } } } @@ -223,6 +227,9 @@ function financialacls_civicrm_buildAmount($component, $form, &$feeBlock) { * @param array $membershipTypeValues */ function financialacls_civicrm_membershipTypeValues($form, &$membershipTypeValues) { + if (!financialacls_is_acl_limiting_enabled()) { + return; + } $financialTypes = NULL; $financialTypes = CRM_Financial_BAO_FinancialType::getAvailableFinancialTypes($financialTypes, CRM_Core_Action::ADD); foreach ($membershipTypeValues as $id => $type) { @@ -247,6 +254,9 @@ function financialacls_civicrm_membershipTypeValues($form, &$membershipTypeValue * @param array $params */ function financialacls_civicrm_fieldOptions($entity, $field, &$options, $params) { + if (!financialacls_is_acl_limiting_enabled()) { + return; + } if ($entity === 'Contribution' && $field === 'financial_type_id' && $params['context'] === 'search') { $action = CRM_Core_Action::VIEW; // At this stage we are only considering the view action. Code from @@ -270,6 +280,18 @@ function financialacls_civicrm_fieldOptions($entity, $field, &$options, $params) } } +/** + * Is financial acl limiting enabled. + * + * Once this extension is detangled enough to be optional this will go + * and the status of the extension rather than the setting will dictate. + * + * @return bool + */ +function financialacls_is_acl_limiting_enabled() { + return (bool) Civi::settings()->get('acl_financial_type'); +} + // --- Functions below this ship commented out. Uncomment as required. --- /** diff --git a/civicrm/release-notes.md b/civicrm/release-notes.md index 26c3abaa1c..a96fc2063d 100644 --- a/civicrm/release-notes.md +++ b/civicrm/release-notes.md @@ -15,6 +15,15 @@ Other resources for identifying changes are: * https://github.com/civicrm/civicrm-joomla * https://github.com/civicrm/civicrm-wordpress +## CiviCRM 5.32.2 + +Released December 12, 2020 + +- **[Synopsis](release-notes/5.32.2.md#synopsis)** +- **[Bugs resolved](release-notes/5.32.2.md#bugs)** +- **[Credits](release-notes/5.32.2.md#credits)** +- **[Feedback](release-notes/5.32.2.md#feedback)** + ## CiviCRM 5.32.1 Released December 5, 2020 diff --git a/civicrm/release-notes/5.32.2.md b/civicrm/release-notes/5.32.2.md new file mode 100644 index 0000000000..d4d5f0d051 --- /dev/null +++ b/civicrm/release-notes/5.32.2.md @@ -0,0 +1,43 @@ +# CiviCRM 5.32.2 + +Released December 12, 2020 + +- **[Synopsis](#synopsis)** +- **[Bugs resolved](#bugs)** +- **[Credits](#credits)** +- **[Feedback](#feedback)** + +## <a name="synopsis"></a>Synopsis + +| *Does this version...?* | | +| --------------------------------------------------------------- | -------- | +| Change the database schema? | no | +| Alter the API? | no | +| Require attention to configuration options? | no | +| **Fix problems installing or upgrading to a previous version?** | **yes** | +| Introduce features? | no | +| **Fix bugs?** | **yes** | + +## <a name="bugs"></a>Bugs resolved + +* **_CiviContribute_: Financial ACLs overzealously enforced ([dev/core#2244](https://lab.civicrm.org/dev/core/-/issues/2244): [#19173](https://github.com/civicrm/civicrm-core/pull/19173))** +* **_CiviContribute_: Fix currency formatting of Total Amount (with multi-currency form support) ([#19185](https://github.com/civicrm/civicrm-core/pull/19185))** +* **_CiviEvent_: Error registering participants via search task ([#19125](https://github.com/civicrm/civicrm-core/pull/19125))** +* **_CiviEvent_: In "Find Participants", the "View" screen misbehaves ([dev/core#2248](https://lab.civicrm.org/dev/core/-/issues/2248): [#19183](https://github.com/civicrm/civicrm-core/pull/19183), [#19189](https://github.com/civicrm/civicrm-core/pull/19189))** +* **_Export_: Extra rows exported when using non-primary fields ([dev/core#2246](https://lab.civicrm.org/dev/core/-/issues/2246): [#19176](https://github.com/civicrm/civicrm-core/pull/19176))** +* **_Upgrader_: After web-based upgrade, Mosaico/Flexmailer services may be missing ([dev/core#2232](https://lab.civicrm.org/dev/core/-/issues/2232): [#19141](https://github.com/civicrm/civicrm-core/pull/19141))** + +## <a name="credits"></a>Credits + +This release was developed by the following authors and reviewers: + +Wikimedia Foundation - Eileen McNaughton; timindaburgh; Tadpole Collective - Kevin +Cristiano; origamiusa; MJW Consulting - Matthew Wire; JMA Consulting - Seamus Lee; Dave D; +Coop SymbioTIC - Mathieu Lutfy; CiviCoop - Jaap Jansma; CiviCRM - Tim Otten; Christian +Wach; Agileware - Justin Freeman; AGH Strategies - Alice Frumin + +## <a name="feedback"></a>Feedback + +These release notes are edited by Tim Otten and Andrew Hunt. If you'd like to +provide feedback on them, please login to https://chat.civicrm.org/civicrm and +contact `@agh1`. diff --git a/civicrm/sql/civicrm_data.mysql b/civicrm/sql/civicrm_data.mysql index 99d41cd7a4..e607f86dc6 100644 --- a/civicrm/sql/civicrm_data.mysql +++ b/civicrm/sql/civicrm_data.mysql @@ -23927,4 +23927,4 @@ INSERT INTO `civicrm_report_instance` ( `domain_id`, `title`, `report_id`, `description`, `permission`, `form_values`) VALUES ( @domainID, 'Survey Details', 'survey/detail', 'Detailed report for canvassing, phone-banking, walk lists or other surveys.', 'access CiviReport', 'a:39:{s:6:"fields";a:2:{s:9:"sort_name";s:1:"1";s:6:"result";s:1:"1";}s:22:"assignee_contact_id_op";s:2:"eq";s:25:"assignee_contact_id_value";s:0:"";s:12:"sort_name_op";s:3:"has";s:15:"sort_name_value";s:0:"";s:17:"street_number_min";s:0:"";s:17:"street_number_max";s:0:"";s:16:"street_number_op";s:3:"lte";s:19:"street_number_value";s:0:"";s:14:"street_name_op";s:3:"has";s:17:"street_name_value";s:0:"";s:15:"postal_code_min";s:0:"";s:15:"postal_code_max";s:0:"";s:14:"postal_code_op";s:3:"lte";s:17:"postal_code_value";s:0:"";s:7:"city_op";s:3:"has";s:10:"city_value";s:0:"";s:20:"state_province_id_op";s:2:"in";s:23:"state_province_id_value";a:0:{}s:13:"country_id_op";s:2:"in";s:16:"country_id_value";a:0:{}s:12:"survey_id_op";s:2:"in";s:15:"survey_id_value";a:0:{}s:12:"status_id_op";s:2:"eq";s:15:"status_id_value";s:1:"1";s:11:"custom_1_op";s:2:"in";s:14:"custom_1_value";a:0:{}s:11:"custom_2_op";s:2:"in";s:14:"custom_2_value";a:0:{}s:17:"custom_3_relative";s:1:"0";s:13:"custom_3_from";s:0:"";s:11:"custom_3_to";s:0:"";s:11:"description";s:75:"Detailed report for canvassing, phone-banking, walk lists or other surveys.";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:17:"access CiviReport";s:6:"groups";s:0:"";s:9:"domain_id";i:1;}'); -UPDATE civicrm_domain SET version = '5.32.1'; +UPDATE civicrm_domain SET version = '5.32.2'; diff --git a/civicrm/sql/civicrm_generated.mysql b/civicrm/sql/civicrm_generated.mysql index f4ccd6e849..b0f92938b5 100644 --- a/civicrm/sql/civicrm_generated.mysql +++ b/civicrm/sql/civicrm_generated.mysql @@ -399,7 +399,7 @@ UNLOCK TABLES; LOCK TABLES `civicrm_domain` WRITE; /*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */; -INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,'5.32.1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}'); +INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,'5.32.2',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}'); /*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */; UNLOCK TABLES; diff --git a/civicrm/templates/CRM/Event/Form/Task/Register.tpl b/civicrm/templates/CRM/Event/Form/Task/Register.tpl new file mode 100644 index 0000000000..2f1ea14ca4 --- /dev/null +++ b/civicrm/templates/CRM/Event/Form/Task/Register.tpl @@ -0,0 +1,12 @@ +{* + +--------------------------------------------------------------------+ + | Copyright CiviCRM LLC. All rights reserved. | + | | + | This work is published under the GNU AGPLv3 license with some | + | permitted exceptions and without any warranty. For full license | + | and copyright information, see https://civicrm.org/licensing | + +--------------------------------------------------------------------+ +*} +{crmScope qfKey=$participantQfKey action=$participantAction} + {include file="CRM/Event/Form/Participant.tpl"} +{/crmScope} diff --git a/civicrm/templates/CRM/Price/Form/Calculate.tpl b/civicrm/templates/CRM/Price/Form/Calculate.tpl index dab6017c01..170334b499 100644 --- a/civicrm/templates/CRM/Price/Form/Calculate.tpl +++ b/civicrm/templates/CRM/Price/Form/Calculate.tpl @@ -31,6 +31,11 @@ var thousandMarker = '{/literal}{$config->monetaryThousandSeparator}{literal}'; var separator = '{/literal}{$config->monetaryDecimalPoint}{literal}'; var symbol = '{/literal}{$currencySymbol}{literal}'; +// moneyFormat is part of a temporary fix. it should +// not be expected to be present in future versions +// see https://github.com/civicrm/civicrm-core/pull/19151 + +var moneyFormat = '{/literal}{$moneyFormat}{literal}'; var optionSep = '|'; // Recalculate the total fees based on user selection @@ -161,7 +166,13 @@ function display(totalfee) { // totalfee is monetary, round it to 2 decimal points so it can // go as a float - CRM-13491 totalfee = Math.round(totalfee*100)/100; - var totalFormattedFee = symbol + ' ' + CRM.formatMoney(totalfee, true); + // dev/core#1019 Use the moneyFormat assigned to the template as an interim fix + // to support forms using a currency other that the site default. Also make sure to + // support various currency formatting options, + // temporary measure - pending + // our preferred fix. + // see https://github.com/civicrm/civicrm-core/pull/19151 + var totalFormattedFee = CRM.formatMoney(totalfee, false, moneyFormat); cj('#pricevalue').html(totalFormattedFee); cj('#total_amount').val( totalfee ); diff --git a/civicrm/vendor/autoload.php b/civicrm/vendor/autoload.php index a7ba308524..c89af820dc 100644 --- a/civicrm/vendor/autoload.php +++ b/civicrm/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit5d94345bc4ed259a7a79dbedea6a29ee::getLoader(); +return ComposerAutoloaderInit318e3bf7bd127d791a6a578c0d058285::getLoader(); diff --git a/civicrm/vendor/composer/autoload_real.php b/civicrm/vendor/composer/autoload_real.php index 4d35d14a08..86ee0eec73 100644 --- a/civicrm/vendor/composer/autoload_real.php +++ b/civicrm/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit5d94345bc4ed259a7a79dbedea6a29ee +class ComposerAutoloaderInit318e3bf7bd127d791a6a578c0d058285 { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInit5d94345bc4ed259a7a79dbedea6a29ee return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit5d94345bc4ed259a7a79dbedea6a29ee', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit318e3bf7bd127d791a6a578c0d058285', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit5d94345bc4ed259a7a79dbedea6a29ee', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit318e3bf7bd127d791a6a578c0d058285', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; $includePaths[] = get_include_path(); @@ -31,7 +31,7 @@ class ComposerAutoloaderInit5d94345bc4ed259a7a79dbedea6a29ee if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit5d94345bc4ed259a7a79dbedea6a29ee::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit318e3bf7bd127d791a6a578c0d058285::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -52,19 +52,19 @@ class ComposerAutoloaderInit5d94345bc4ed259a7a79dbedea6a29ee $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit5d94345bc4ed259a7a79dbedea6a29ee::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit318e3bf7bd127d791a6a578c0d058285::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire5d94345bc4ed259a7a79dbedea6a29ee($fileIdentifier, $file); + composerRequire318e3bf7bd127d791a6a578c0d058285($fileIdentifier, $file); } return $loader; } } -function composerRequire5d94345bc4ed259a7a79dbedea6a29ee($fileIdentifier, $file) +function composerRequire318e3bf7bd127d791a6a578c0d058285($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/civicrm/vendor/composer/autoload_static.php b/civicrm/vendor/composer/autoload_static.php index 9659318274..6f9c589d15 100644 --- a/civicrm/vendor/composer/autoload_static.php +++ b/civicrm/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit5d94345bc4ed259a7a79dbedea6a29ee +class ComposerStaticInit318e3bf7bd127d791a6a578c0d058285 { public static $files = array ( '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', @@ -583,11 +583,11 @@ class ComposerStaticInit5d94345bc4ed259a7a79dbedea6a29ee public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit5d94345bc4ed259a7a79dbedea6a29ee::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit5d94345bc4ed259a7a79dbedea6a29ee::$prefixDirsPsr4; - $loader->prefixesPsr0 = ComposerStaticInit5d94345bc4ed259a7a79dbedea6a29ee::$prefixesPsr0; - $loader->fallbackDirsPsr0 = ComposerStaticInit5d94345bc4ed259a7a79dbedea6a29ee::$fallbackDirsPsr0; - $loader->classMap = ComposerStaticInit5d94345bc4ed259a7a79dbedea6a29ee::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit318e3bf7bd127d791a6a578c0d058285::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit318e3bf7bd127d791a6a578c0d058285::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit318e3bf7bd127d791a6a578c0d058285::$prefixesPsr0; + $loader->fallbackDirsPsr0 = ComposerStaticInit318e3bf7bd127d791a6a578c0d058285::$fallbackDirsPsr0; + $loader->classMap = ComposerStaticInit318e3bf7bd127d791a6a578c0d058285::$classMap; }, null, ClassLoader::class); } diff --git a/civicrm/xml/version.xml b/civicrm/xml/version.xml index b6c013a333..f333d56703 100644 --- a/civicrm/xml/version.xml +++ b/civicrm/xml/version.xml @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="iso-8859-1" ?> <version> - <version_no>5.32.1</version_no> + <version_no>5.32.2</version_no> </version> -- GitLab