Related fix for CRM-13630
authormonishdeb <monish.deb@webaccess.co.in>
Wed, 30 Oct 2013 14:41:54 +0000 (20:11 +0530)
committermonishdeb <monish.deb@webaccess.co.in>
Wed, 30 Oct 2013 14:41:54 +0000 (20:11 +0530)
----------------------------------------
* CRM-13630: Minimum contribution amount check for Premiums fails when online contribution form uses a Membership price set.
  http://issues.civicrm.org/jira/browse/CRM-13630

templates/CRM/Contribute/Form/Contribution/PremiumBlock.tpl

index 7b1ae2b66fb259dc306a5900b91d73024b16df83..78812a7f2cfeca6e73a0ee87ae03b97124a07fcd 100644 (file)
                 cj(option[0]).val(option[1]);
                 cj(option[0]).trigger('change');
               }
-              else if (cj(price_sets[amount]).attr('type') == 'checkbox') {
-                cj(price_sets[amount]).attr("checked",true);
+              else if (cj(price_sets[selected_price_set]).attr('type') == 'checkbox') {
+                cj(price_sets[selected_price_set]).attr("checked",true);
                 if ((typeof totalfee !== 'undefined') && (typeof display == 'function')) {
                   if (totalfee > 0) {
                     totalfee += amount;
                 }
              }
              else {
-               cj(price_sets[amount]).click();
-               cj(price_sets[amount]).trigger('click');
+               cj(price_sets[selected_price_set]).click();
+               cj(price_sets[selected_price_set]).trigger('click');
              }
             }
           }