Repository navigation
[18.0] [FIX] website_altcha: Changes to make sure that altcha defined elements are not being used as global elements - #1232
Conversation
…ts are not being used as global elements
|
Hi @hbrunn, |
tarteo
left a comment
There was a problem hiding this comment.
Confirmed, this fixes the issue.
|
@hbrunn , can you please check this? |
hbrunn
left a comment
There was a problem hiding this comment.
nagging me not even a week after ocabot already notified me usually has adverse effects up to getting you on my block list.
that being said, thanks for this. though I'm not a fan of modifying bundled files, we can only load js assets as modules from v20 conveniently and implementing this here doesn't seem worth the hassle
|
This PR has the |
|
/ocabot merge patch |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 9e1ecc7. Thanks a lot for contributing to OCA. ❤️ |
This fix avoids defining/overriding the elements(variables/methods) defined in static/lib/altcha.js as global elements so that other functionalities work as expected.
For instance, while I was working on adding the altcha for website_payment module , I had to inherit the _initiatePaymentFlow method. This method in the base make use of Bootstrap Popover as can be seen at https://github.com/odoo/odoo/blob/bcd8e82cf06ae78299144bc1f35b53fab36540b8/addons/website_payment/static/src/js/payment_form.js#L79 . But since the altcha.js also defines Popover at
website/website_altcha/static/lib/altcha.js
Line 5432 in 9945a34