This PR fixes a couple of CSP violations on the billing index page caused by some inlined JS in onclick attributes of buttons. I extracted the onclick to a function and added event listeners for the few buttons that needed it.
Before, when clicking the enable/disable autopay button on a credit card, the request is in flight but the button content has not updated:
After, when clicking the enable/disable autopay button on a credit card, the request is in flight and the button content has updated:
This PR fixes a couple of CSP violations on the billing index page caused by some inlined JS in onclick attributes of buttons. I extracted the onclick to a function and added event listeners for the few buttons that needed it.
Before, when clicking the enable/disable autopay button on a credit card, the request is in flight but the button content has not updated:
After, when clicking the enable/disable autopay button on a credit card, the request is in flight and the button content has updated: