PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | square/js/settings.js +4 -4 6.25 → trunk View file →
@@ -3,9 +3,9 @@
3 3 buttons.forEach( function( button ) {
4 4 button.addEventListener( 'click', function( e ) {
5 5 e.preventDefault();
6 6
7 - const mode = button.dataset.mode;
7 + const { mode } = button.dataset;
8 8 if ( 'test' === mode ) {
9 9 frmDom.modal.maybeCreateModal(
10 10 'frm_square_test_setup_modal',
11 11 {
@@ -19,9 +19,9 @@
19 19 const formData = new FormData();
20 20 formData.append( 'mode', mode );
21 21 frmDom.ajax.doJsonPost( 'square_oauth', formData ).then(
22 22 function( response ) {
23 - if ( 'undefined' !== typeof response.redirect_url ) {
23 + if ( response.redirect_url !== undefined ) {
24 24 window.location = response.redirect_url;
25 25 }
26 26 }
27 27 );
@@ -39,9 +39,9 @@
39 39 const formData = new FormData();
40 40 formData.append( 'testMode', 'test' === event.target.id.replace( 'frm_disconnect_square_', '' ) ? 1 : 0 );
41 41 frmDom.ajax.doJsonPost( 'square_disconnect', formData ).then(
42 42 function( response ) {
43 - if ( 'undefined' !== typeof response.success && response.success ) {
43 + if ( response.success ) {
44 44 window.location.reload();
45 45 }
46 46 }
47 47 );
@@ -58,9 +58,9 @@
58 58 const formData = new FormData();
59 59 formData.append( 'mode', 'test' );
60 60 frmDom.ajax.doJsonPost( 'square_oauth', formData ).then(
61 61 function( response ) {
62 - if ( 'undefined' !== typeof response.redirect_url ) {
62 + if ( response.redirect_url !== undefined ) {
63 63 window.location = response.redirect_url;
64 64 jQuery( modal ).dialog( 'close' );
65 65 }
66 66 }