Closed minusf closed 4 years ago
@minusf:
Thanks for bringing this up. That submitFormButton.removeAttr('type')
is probably caused by another browser API change. I'll take a look at it ASAP.
The rest looks OK. I'm merging it into v0.16.x (and then into master).
P. S. Release will follow shortly.
Released in 0.16.3.
Recently I had a configuration error where the
SITE_KEY
remained unset and the empty defaults made the widget render without the captcha and subsequently fail every submission. While the form showed a validation error, it's not user friendly, and it took days until someone reported it. Lack of logging made tracking down this issue needlessly long as well. When this widget is required, having an emptySITE_KEY
and/orSITE_SECRET
is simply an error and should be handled as such.While here, simplify the widget and add the
SITE_KEY
as the hidden input field'svalue=
instead of creating a free floating<script>
tag with a single variable. Use a customdata-
field to make selection easy. TBH I think for this widget bothlabel
(never shown) andname
do not make sense:name
should just be hard coded, as there will never be more than one captcha in one page and then we could simply rely onname
(orid
)...Remove the empty defaults, they dont make sense. This diff is against 0.16.1
PS.
submitFormButton.removeAttr('type');
generates console errorsUncaught Error: type property can't be changed
and probably shouldnt be used.