Commit 0167df1d authored by KR Moorhouse's avatar KR Moorhouse Committed by GitHub

Merge pull request #3101 from wpninjas/issue#2843-2

Only show AJAX POST error message on publish.
parents 25aa5a16 3c4a92ee
......@@ -222,10 +222,14 @@ define( [], function() {
}
} ).fail( function( xhr, status, error ) {
console.log( xhr.status );
console.log( error );
console.log( action );
// For previews, only log to the console.
if( 'preview' == action ) {
console.log( error );
return;
}
// @todo Convert alert to jBox Modal.
alert( xhr.status + ' ' + error + '\r\n' + 'An error on the server caused your form not to publish.\r\nPlease contact Ninja Forms Support with your PHP Error Logs.\r\nhttps://ninjaforms.com/contact' );
alert(xhr.status + ' ' + error + '\r\n' + 'An error on the server caused your form not to publish.\r\nPlease contact Ninja Forms Support with your PHP Error Logs.\r\nhttps://ninjaforms.com/contact');
});
},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment