File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
import Mixin from '@ember/object/mixin' ;
2
2
3
3
export default Mixin . create ( {
4
+
4
5
actions : {
6
+
7
+ onCaptchaRendered ( ) {
8
+ console . info ( 'reCaptcha just rendered' ) ;
9
+ } ,
10
+
5
11
onCaptchaResolved ( reCaptchaResponse ) {
6
12
window . swal (
7
13
'reCaptcha successfully resolved!' ,
@@ -10,6 +16,7 @@ export default Mixin.create({
10
16
) ;
11
17
console . info ( 'reCaptcha response:\n' + reCaptchaResponse ) ;
12
18
} ,
19
+
13
20
onCaptchaExpired ( ) {
14
21
window . swal ( {
15
22
title : 'reCaptcha response expired!' ,
@@ -18,8 +25,10 @@ export default Mixin.create({
18
25
this . transitionToRoute ( 'index' ) ;
19
26
} ) ;
20
27
} ,
28
+
21
29
forceReset ( ) {
22
30
this . get ( 'gRecaptcha' ) . resetReCaptcha ( ) ;
23
31
}
24
32
}
33
+
25
34
} ) ;
Original file line number Diff line number Diff line change 1
1
<h2 >Google Defaults</h2 >
2
- {{ g-recaptcha onSuccess = (action " onCaptchaResolved" ) ref = (mut gRecaptcha ) }}
2
+ {{ g-recaptcha
3
+ onRender = (action " onCaptchaRendered" )
4
+ onSuccess = (action " onCaptchaResolved" )
5
+ ref = (mut gRecaptcha )
6
+ }}
3
7
<p ><a href =" " {{ action " forceReset" }} >Force reset</a ></p >
You can’t perform that action at this time.
0 commit comments