Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to publish view file #38

Open
codedge opened this issue May 1, 2022 · 5 comments
Open

Option to publish view file #38

codedge opened this issue May 1, 2022 · 5 comments

Comments

@codedge
Copy link

codedge commented May 1, 2022

Would it be possible to add an option to publish the view file (where the JS code is in)?

Background is, that I need to add certain attributes to the <script .. tag in order to make it work with https://www.consentmanager.de/

Or is there any other option to modify the JS code that loads the recaptcha?

@aryehraber
Copy link
Owner

Hi @codedge, I guess that should be possible though I'm curious what attribute(s) you're trying to customise?

Or is there any other option to modify the JS code that loads the recaptcha?

You can choose to not use the built in {{ captcha:head }} tag and simply write your own front-end integration, then Captcha will simply do the backend validation work.

@codedge
Copy link
Author

codedge commented May 3, 2022

For example https://help.consentmanager.de/B%C3%BCcher/CMP/%21/Arbeiten-mit-Google-Recaptcha:

I'd like to add data-cmp-ab="1" to the <script> tag to prevent the blocking through the Consent Manager, as without Recaptcha your forms would not work anyway.

@aryehraber
Copy link
Owner

aryehraber commented May 3, 2022

Thanks for the extra info, I think with customisations like that it would be best to publish the view files, as you suggested.

I'm not sure how soon I'll be able to work on this, so short-term you can simply copy-paste parts of the view file (without the @if & @endif blade directives) into your template replacing your current {{ captcha:head }} tag, then make any customisations you need.

@codedge
Copy link
Author

codedge commented May 4, 2022

Yeah, I thought so.

If you are open, I could also provide some publish option for the view files in an MR.

@aryehraber
Copy link
Owner

That'd be great, I'd be happy to review a Pull Request and merge 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants