Skip to content

[18.0][IMP] website_altcha: allow appending the widget - #1221

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
Nitrokey:18.0-fix-website_altcha-append
Oct 19, 2026
Merged

OCA-git-bot merged 1 commit into
OCA:18.0from
Nitrokey:18.0-fix-website_altcha-append

Conversation

@jans23

@jans23 jans23 commented Sep 25, 2026 •

Copy link
Copy Markdown

Add altcha_append_to so that inheriting widgets can append the widget to an element instead of prepending it, such as website_mass_mailing_altcha.

Assisted-by: Claude Opus 5.5 (1M context)

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @hbrunn,
some modules you are maintaining are being modified, check this out!

@jans23 jans23 changed the title [IMP] website_altcha: allow appending the widget [18.0][IMP] website_altcha: allow appending the widget Sep 25, 2026
@jans23 jans23 mentioned this pull request Sep 25, 2026
1 task done
Comment thread website_altcha/static/src/altcha.esm.js Outdated
@jans23
jans23 force-pushed the 18.0-fix-website_altcha-append branch from 88e6025 to 34b3231 Compare October 5, 2026 12:17
@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Comment thread website_altcha/static/src/altcha.esm.js Outdated
this.$el
.find(this.altcha_prepend_to)
.prepend(renderToString("website_altcha.AltchaWidget", {}));
if (this.altcha_append_to) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also have before and after as options for altcha widget ? Something like the following allowing for more flexibility with the altcha placement.

if (this.altcha_before) { this.$el .find(this.altcha_before) .before(renderToString("website_altcha.AltchaWidget", {})); } else if (this.altcha_after) { this.$el .find(this.altcha_after) .after(renderToString("website_altcha.AltchaWidget", {})); } else if (this.altcha_append_to) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hbrunn , @etobella ,your thoughts on this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add extra options here as need arises

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing div:has(<original css selector here>) you could do a before and after. I suggest we merge this PR, and do this later when necessary. @ByteMeAsap are you okay with that?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or @jans23 is it for you a small effort to add these extra options?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I added "before" and "after".

Add altcha_append_to so that inheriting widgets can append the widget
to an element instead of prepending it, such as
website_mass_mailing_altcha.

Assisted-by: Claude Opus 5.5 (1M context)
@jans23
jans23 force-pushed the 18.0-fix-website_altcha-append branch from 34b3231 to d0c2420 Compare October 16, 2026 15:08
@jans23

jans23 commented Oct 16, 2026

Copy link
Copy Markdown
Author

@pilarvargas-tecnativa could you merge this please?

@pilarvargas-tecnativa

Copy link
Copy Markdown
Contributor

/ocabot merge minor

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Sorry @pilarvargas-tecnativa you are not allowed to merge.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

@etobella

Copy link
Copy Markdown
Member

/ocabot merge minor

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 18.0-ocabot-merge-pr-1221-by-etobella-bump-minor, awaiting test results.

@pilarvargas-tecnativa

Copy link
Copy Markdown
Contributor

That’s right! I got it wrong, I thought it was in e-commerce :S

@OCA-git-bot
OCA-git-bot merged commit 2bc90b4 into OCA:18.0 Oct 19, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at fb33d1a. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants