SonarSoftwareInc / customer_portal

A prebuilt customer portal for Sonar.
https://sonar.software
25 stars 51 forks source link

AB#4334 Fix CSP violations #137

Closed cjw6k closed 1 year ago

cjw6k commented 2 years ago

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:

ab4296-before

After, when clicking the enable/disable autopay button on a credit card, the request is in flight and the button content has updated:

ab4296-after