Code cleanup.
This commit is contained in:
parent
ee9b589a5f
commit
456123fa70
@ -91,7 +91,7 @@ Captcha.v1 =
|
|||||||
onPostChange: ->
|
onPostChange: ->
|
||||||
|
|
||||||
setup: (focus, force) ->
|
setup: (focus, force) ->
|
||||||
return unless @isEnabled and (@needed() or force)
|
return unless @isEnabled and (force or @needed())
|
||||||
@create()
|
@create()
|
||||||
@nodes.input.focus() if focus
|
@nodes.input.focus() if focus
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ Captcha.v1 =
|
|||||||
|
|
||||||
destroy: ->
|
destroy: ->
|
||||||
return unless @script
|
return unless @script
|
||||||
$.globalEval 'Recaptcha.destroy()'
|
$.globalEval 'window.Recaptcha.destroy();'
|
||||||
@beforeSetup() if @nodes
|
@beforeSetup() if @nodes
|
||||||
|
|
||||||
sync: (captchas=[]) ->
|
sync: (captchas=[]) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user