From 7cdf220a018098cac54c547330ef9284c612b370 Mon Sep 17 00:00:00 2001 From: Christian Wach Date: Wed, 17 Jan 2024 13:41:19 +0000 Subject: [PATCH] Fix JS error and allow focus of Other Amount field --- templates/CRM/Contribute/Form/Contribution/Main.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/CRM/Contribute/Form/Contribution/Main.tpl b/templates/CRM/Contribute/Form/Contribution/Main.tpl index d44bd2b600..054776ad3d 100644 --- a/templates/CRM/Contribute/Form/Contribution/Main.tpl +++ b/templates/CRM/Contribute/Form/Contribution/Main.tpl @@ -23,6 +23,9 @@ if ( element.type == 'radio' && element.name === mainPriceFieldName ) { if (element.value == '0' ) { element.checked = true; + // Copied from `updatePriceSetHighlight()` below which isn't available here. + cj('#priceset .price-set-row span').removeClass('highlight'); + cj('#priceset .price-set-row input:checked').parent().addClass('highlight'); } else { element.checked = false; @@ -321,7 +324,7 @@ var isRecur = cj('input[id="is_recur"]:checked'); var quickConfig = {/literal}'{$quickConfig}'{literal}; - if (cj("#auto_renew") && quickConfig) { + if (cj("#auto_renew").length && quickConfig) { showHideAutoRenew(null); } -- 2.25.1