Remove notice-causing code that seems unreachable
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 21 Sep 2023 04:37:46 +0000 (16:37 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 21 Sep 2023 18:27:23 +0000 (06:27 +1200)
I really can't find any way this code could be triggered - I think it
might have been quietly broken for years...

templates/CRM/Member/Form/MembershipType.tpl

index 78dd2adb481a0745e1a7131cb78ee63ddea693a1..f438e9942ab076f641980ba77d92c1a42ce88170 100644 (file)
@@ -171,27 +171,6 @@ function showHidePeriodSettings() {
   }
 }
 
-//load the auto renew msg if recur allow.
-{/literal}{if $authorize and $allowAutoRenewMsg}{literal}
-CRM.$(function($) {
-  setReminder( null );
-});
-{/literal}{/if}{literal}
-
-function setReminder( autoRenewOpt ) {
-  //don't process.
-  var allowToProcess = {/literal}'{$allowAutoRenewMsg}'{literal};
-  if ( !allowToProcess ) {
-    return;
-  }
-  if ( !autoRenewOpt ) {
-    autoRenewOpt = cj( 'input:radio[name="auto_renew"]:checked').val();
-  }
-  funName = 'hide();';
-  if ( autoRenewOpt == 1 || autoRenewOpt == 2 ) funName = 'show();';
-  eval( "cj('#autoRenewalMsgId')." + funName );
-}
-
 function showHideMaxRelated(relTypeId) {
   if (relTypeId) {
     cj('#maxRelated').show();