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

Add Recaptcha Component - resolves #192 #233

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

richardbishopme
Copy link

Hi Jeffrey,

This PR wraps the Recaptcha functionality into its own Vue component.

Issue

Currently, when a user tries to submit a thread through the modal by clicking the Add New Thread button, the Recaptcha checkbox doesn't render as it is now inside the modal component. As a result, the validation fails when submitting the thread.

Fix

To fix this, I created a Recaptcha component. When the mounted event fires, it passes the sitekey to the Recaptcha render script to get the necessary code for the Recaptcha box. The tag itself is very similar to what we had before:

<recaptcha ref="recaptcha" sitekey="{{ config('services.recaptcha.key') }}"></recaptcha>

An old file

I also removed the resources/views/threads/create.blade.php file as we now use the modal. I couldn't see it referenced anywhere and the tests still passed.

An existing unrelated bug

When testing, I noticed that when you submit a thread, we end up on the Thread detail screen. If we try to submit another thread, we end up getting a conflict with what looks like reply body field and the thread body field. It shows up in the validation errors.

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

Successfully merging this pull request may close these issues.

3 participants