Skip to content

Commit

Permalink
removed messages if the validation doesnt fail
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'remotes/upstream/staging' into username

Conflicts:
	administrator/language/en-GB/en-GB.com_users.ini
  • Loading branch information
mxkmp29 authored and mxkmp29 committed Sep 30, 2016
1 parent 48196ad commit a8f6ae3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions media/com_users/js/validate-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
type: 'POST',
url: ajaxUrl + '&username=' + name
}).done(function(data){
Joomla.removeMessages();
if(data.success){
message = {
'warning' : [data.message]
Expand All @@ -35,6 +36,7 @@
type: 'POST',
url: ajaxUrl + '&email=' + mail
}).done(function (data) {
Joomla.removeMessages();
if (data.success) {
message = {
'warning': [data.message]
Expand All @@ -59,6 +61,8 @@
'warning' : [ Joomla.JText._('COM_USERS_PROFILE_EMAIL2_MESSAGE') ]
};
Joomla.renderMessages(message);
}else{
Joomla.removeMessages();
}
}
});
Expand All @@ -72,6 +76,8 @@
'warning' : [ Joomla.JText._('COM_USERS_FIELD_RESET_PASSWORD1_MESSAGE')]
};
Joomla.renderMessages(message);
}else{
Joomla.removeMessages();
}
}
});
Expand Down

0 comments on commit a8f6ae3

Please sign in to comment.