diff options
Diffstat (limited to 'Postman/Postman-Connectivity-Test')
-rw-r--r-- | Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php | 10 | ||||
-rw-r--r-- | Postman/Postman-Connectivity-Test/postman_port_test.js | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php b/Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php index 3e17dbd..6ff5a69 100644 --- a/Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php +++ b/Postman/Postman-Connectivity-Test/PostmanConnectivityTestController.php @@ -98,6 +98,14 @@ class PostmanConnectivityTestController { wp_enqueue_script( 'postman_port_test_script' ); $warning = __( 'Warning', 'post-smtp' ); wp_localize_script( PostmanViewController::POSTMAN_SCRIPT, 'postman_hostname_element_name', '#input_' . PostmanOptions::HOSTNAME ); + wp_localize_script( PostmanViewController::POSTMAN_SCRIPT, 'postman_email_test', array( + 'recipient' => '#' . PostmanSendTestEmailController::RECIPIENT_EMAIL_FIELD_NAME, + 'not_started' => _x( 'In Outbox', 'Email Test Status', 'post-smtp' ), + 'sending' => _x( 'Sending...', 'Email Test Status', 'post-smtp' ), + 'success' => _x( 'Success', 'Email Test Status', 'post-smtp' ), + 'failed' => _x( 'Failed', 'Email Test Status', 'post-smtp' ), + 'ajax_error' => __( 'Ajax Error', 'post-smtp' ), + ) ); PostmanConnectivityTestController::addLocalizeScriptForPortTest(); } static function addLocalizeScriptForPortTest() { @@ -135,6 +143,8 @@ class PostmanConnectivityTestController { public function outputPortTestContent() { print '<div class="wrap">'; + wp_nonce_field('post-smtp', 'security'); + PostmanViewController::outputChildPageHeader( __( 'Connectivity Test', 'post-smtp' ) ); print '<p>'; diff --git a/Postman/Postman-Connectivity-Test/postman_port_test.js b/Postman/Postman-Connectivity-Test/postman_port_test.js index 1d5c3fb..8667c06 100644 --- a/Postman/Postman-Connectivity-Test/postman_port_test.js +++ b/Postman/Postman-Connectivity-Test/postman_port_test.js @@ -73,7 +73,7 @@ function portQuizTest(socket, hostname, port) { 'action' : 'postman_port_quiz_test', 'hostname' : hostname, 'port' : port, - '_wpnonce' : jQuery('#_wpnonce').val(), + 'security' : jQuery('#security').val(), }; jQuery.post( ajaxurl, @@ -201,7 +201,7 @@ function portTest3(socket, hostname, port, open) { 'action' : 'postman_test_smtps', 'hostname' : hostname, 'port' : port, - '_wpnonce' : jQuery('#_wpnonce').val(), + 'security' : jQuery('#security').val(), }; jQuery .post( |