Commit 3c4a92ee authored by kjohnson's avatar kjohnson

only show AJAX POST error message on publish.

parent 0b2b95f4
......@@ -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