From fdf1844bbd153725ae916dd66dda8b46c6842272 Mon Sep 17 00:00:00 2001 From: yashodha Date: Thu, 22 Aug 2013 16:43:17 +0530 Subject: [PATCH] clean up --- CRM/Event/Form/Registration/Register.php | 2 +- .../CRM/Event/Form/Registration/Register.tpl | 36 ++++--------------- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index 36da330781..b24d9eb48e 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -450,7 +450,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { if ($this->_values['event']['is_monetary']) { if (count($pps) > 1) { $this->addRadio('payment_processor', ts('Payment Method'), $pps, - NULL, " ", FALSE + NULL, " " ); } elseif (!empty($pps)) { diff --git a/templates/CRM/Event/Form/Registration/Register.tpl b/templates/CRM/Event/Form/Registration/Register.tpl index cc7f41c30e..2863ba9cc1 100644 --- a/templates/CRM/Event/Form/Registration/Register.tpl +++ b/templates/CRM/Event/Form/Registration/Register.tpl @@ -97,14 +97,6 @@ {include file="CRM/Price/Form/PriceSet.tpl" extends="Event"} {include file="CRM/Price/Form/ParticipantCount.tpl"} {if ! $quickConfig}{/if} - - {if $form.is_pay_later} -
-
 
-
{$form.is_pay_later.html} {$form.is_pay_later.label}
-
-
- {/if} {/if} {if $pcp && $is_honor_roll }
@@ -254,15 +246,13 @@ {/literal}{/if}{literal} } - {/literal}{if ($form.is_pay_later or $bypassPayment) and $paymentProcessor.payment_processor_type EQ 'PayPal_Express'} + {/literal}{if ($bypassPayment) and $paymentProcessor.payment_processor_type EQ 'PayPal_Express'} {literal} showHidePayPalExpressOption(); {/literal}{/if}{literal} function showHidePayPalExpressOption() { - var payLaterElement = {/literal}{if $form.is_pay_later}true{else}false{/if}{literal}; - if (( cj("#bypass_payment").val() == 1 ) || - ( payLaterElement && document.getElementsByName('is_pay_later')[0].checked )) { + if (( cj("#bypass_payment").val() == 1 )) { cj("#crm-submit-buttons").show(); cj("#paypalExpress").hide(); } @@ -272,15 +262,12 @@ } } - {/literal}{if ($form.is_pay_later or $bypassPayment) and $showHidePaymentInformation}{literal} + {/literal}{if ($bypassPayment and $showHidePaymentInformation)}{literal} showHidePaymentInfo(); {/literal} {/if}{literal} function showHidePaymentInfo() { - var payLater = {/literal}{if $form.is_pay_later}true{else}false{/if}{literal}; - - if (( cj("#bypass_payment").val() == 1 ) || - ( payLater && document.getElementsByName('is_pay_later')[0].checked )) { + if (( cj("#bypass_payment").val() == 1 )) { cj('#billing-payment-block').hide(); } else { @@ -321,12 +308,6 @@ //set the value for hidden bypass payment. cj("#bypass_payment").val(1); - - //hide pay later. - {/literal}{if $form.is_pay_later}{literal} - cj("#is-pay-later").hide(); - {/literal} {/if}{literal} - } else { if (isrequireApproval) { @@ -338,21 +319,16 @@ } //reset value since user don't want or not eligible for waitlist cj("#bypass_payment").val(0); - - //need to show paylater if exists. - {/literal}{if $form.is_pay_later}{literal} - cj("#is-pay-later").show(); - {/literal} {/if}{literal} } //now call showhide payment info. {/literal} - {if ($form.is_pay_later or $bypassPayment) and $paymentProcessor.payment_processor_type EQ 'PayPal_Express'}{literal} + {if ($bypassPayment) and $paymentProcessor.payment_processor_type EQ 'PayPal_Express'}{literal} showHidePayPalExpressOption(); {/literal}{/if} {literal} - {/literal}{if ($form.is_pay_later or $bypassPayment) and $showHidePaymentInformation}{literal} + {/literal}{if ($bypassPayment) and $showHidePaymentInformation}{literal} showHidePaymentInfo(); {/literal}{/if}{literal} } -- 2.25.1