This PR fixes the issue when select membership type then instalments schedule table is shown on the non payment plan tab (contribution).
Before
Instalment Schedule displays on the contribution tab.
After
Instalment Schedule displays ONLY when select payment plan tab.
Technical Details
Since we refactored the code and separate the javascript to the different file in this PR.
The constant variables that requires to exist when smart template is completed have not been passed to the javascript in the separate file because they are the indifferent scope therefore, the screen are not working correctly
How this was addressed?
In order to maintain the javascript logic from the smart template and javascript logic relies on the constant values on the template, we would need to put the function in jquery anonymous function inside the global scope function so it can be called from anywhere.
Alternatively, we could define a namespace to reduce risk of name collisions instead of using a global scope function but in this case, we are less likely to run into any issue as this function will only be used for payment toggler screen.
Overview
This PR fixes the issue when select membership type then instalments schedule table is shown on the non payment plan tab (contribution).
Before
Instalment Schedule displays on the contribution tab.
After
Instalment Schedule displays ONLY when select payment plan tab.
Technical Details
Since we refactored the code and separate the javascript to the different file in this PR.
The constant variables that requires to exist when smart template is completed have not been passed to the javascript in the separate file because they are the indifferent scope therefore, the screen are not working correctly
How this was addressed?
In order to maintain the javascript logic from the smart template and javascript logic relies on the constant values on the template, we would need to put the function in jquery anonymous function inside the global scope function so it can be called from anywhere.
Alternatively, we could define a namespace to reduce risk of name collisions instead of using a global scope function but in this case, we are less likely to run into any issue as this function will only be used for payment toggler screen.