The source project of this merge request has been removed.
Refactor all duplicated taxcalculator JS into a reusable function
The problem
Presently, we have two areas where we handle hiding the existing province/country fields. One on ```crmLoad``` and another on page load. The problem is that when you switch between payment processors it duplicates the fields. I felt it would be best just to create a function out of all the hiding code that is initially used on pageLoad and then use that in ```crmLoad``` also
Solution
Pushed all the code used to hide the fields into one ```CRM.taxcalculatorRebuildFields()``` which is now called once on page load and also on ```crmLoad```. This means less duplicated code and standardizes things a bit.
There is still another issue we have to deal with but I'll open another ticket for that #12
Edited by shaneonabike