File tree Expand file tree Collapse file tree 1 file changed +4
-19
lines changed Expand file tree Collapse file tree 1 file changed +4
-19
lines changed Original file line number Diff line number Diff line change 11( function ( $ ) {
22 'use strict' ;
3-
3+
44 jQuery ( document ) . ready ( function ( ) {
55
66 $ ( '#gdrf-form' ) . on ( 'submit' , function ( event ) {
7-
7+
88 event . preventDefault ( ) ;
9-
10- var data_type = '' ;
11- if ( $ ( 'input[name=gdrf_data_type]' ) . is ( ':checkbox' ) ) {
12- data_type = $ ( 'input[name=gdrf_data_type]:checked' , '#gdrf-form' ) . val ( ) ;
13- } else {
14- data_type = $ ( 'input[name=gdrf_data_type]' , '#gdrf-form' ) . val ( ) ;
15- }
16-
17- var button = $ ( '#gdrf-submit-button' ) ,
18- data = {
19- 'action' : 'gdrf_data_request' ,
20- 'gdrf_data_type' : data_type ,
21- 'gdrf_data_human_key' : $ ( '#gdrf_data_human_key' ) . val ( ) ,
22- 'gdrf_data_email' : $ ( '#gdrf_data_email' ) . val ( ) ,
23- 'gdrf_data_human' : $ ( '#gdrf_data_human' ) . val ( ) ,
24- 'gdrf_data_nonce' : $ ( '#gdrf_data_nonce' ) . val ( ) ,
25- } ;
9+
10+ var data = $ ( this ) . serialize ( ) ;
2611
2712 $ ( '.gdrf-errors' ) . remove ( ) ;
2813 $ ( '.gdrf-success' ) . remove ( ) ;
You can’t perform that action at this time.
0 commit comments