mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
IMPR: reset existing captcha on AJAX
This commit is contained in:
parent
7d086d9868
commit
ed7c74d474
@ -6,6 +6,10 @@ const CaptchaUI = ((window) => {
|
|||||||
const init = () => {
|
const init = () => {
|
||||||
console.log(`${NAME}: init`)
|
console.log(`${NAME}: init`)
|
||||||
|
|
||||||
|
if (typeof window.grecaptcha.render !== 'function') {
|
||||||
|
window.grecaptcha.reset()
|
||||||
|
}
|
||||||
|
|
||||||
const submitListener = (e) => {
|
const submitListener = (e) => {
|
||||||
console.log(`${NAME}: Validating Captcha ...`)
|
console.log(`${NAME}: Validating Captcha ...`)
|
||||||
const field = e.currentTarget.querySelectorAll(`.${NAME}, .g-recaptcha`).forEach((el) => {
|
const field = e.currentTarget.querySelectorAll(`.${NAME}, .g-recaptcha`).forEach((el) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user