From 85be86a9e438aa32ec6cc5f288e6bab1846917c8 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Sat, 7 Dec 2013 11:48:00 +0100 Subject: [PATCH] better error message on materio_user.js login/register ajax submit --- js/materio_user.js | 4 ++-- js/materio_user.min.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/materio_user.js b/js/materio_user.js index f7f92c40..78258275 100755 --- a/js/materio_user.js +++ b/js/materio_user.js @@ -89,7 +89,7 @@ MaterioUser = function(){ url: Drupal.settings.basePath+Drupal.settings.pathPrefix+"materio_user/register/submit", data: $('#user-register-form', $modal).serialize(), success: function(data) { onUserLoginRegisterSubmit($('#user-register-form'), data, destination);}, - error: function() {trace('error');} + error: function(jqXHR, textStatus, errorThrown) { trace('error : '+textStatus+' | '+errorThrown); } }); return false; }); @@ -102,7 +102,7 @@ MaterioUser = function(){ url: Drupal.settings.basePath+Drupal.settings.pathPrefix+"materio_user/login/submit", data: $('#user-login', $modal).serialize(), success: function(data){ onUserLoginRegisterSubmit($('#user-login'), data, destination); }, - error: function() { trace('error'); } + error: function(jqXHR, textStatus, errorThrown) { trace('error : '+textStatus+' | '+errorThrown); } }); return false; }); diff --git a/js/materio_user.min.js b/js/materio_user.min.js index 400f414a..b84069eb 100755 --- a/js/materio_user.min.js +++ b/js/materio_user.min.js @@ -459,7 +459,7 @@ MaterioUser = function(){ url: Drupal.settings.basePath+Drupal.settings.pathPrefix+"materio_user/register/submit", data: $('#user-register-form', $modal).serialize(), success: function(data) { onUserLoginRegisterSubmit($('#user-register-form'), data, destination);}, - error: function() {trace('error');} + error: function(jqXHR, textStatus, errorThrown) { trace('error : '+textStatus+' | '+errorThrown); } }); return false; }); @@ -472,7 +472,7 @@ MaterioUser = function(){ url: Drupal.settings.basePath+Drupal.settings.pathPrefix+"materio_user/login/submit", data: $('#user-login', $modal).serialize(), success: function(data){ onUserLoginRegisterSubmit($('#user-login'), data, destination); }, - error: function() { trace('error'); } + error: function(jqXHR, textStatus, errorThrown) { trace('error : '+textStatus+' | '+errorThrown); } }); return false; });