summaryrefslogtreecommitdiffstats
path: root/settings/js/personal.js
diff options
context:
space:
mode:
Diffstat (limited to 'settings/js/personal.js')
-rw-r--r--settings/js/personal.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index 3079cf27e06..aef67f719c0 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -272,13 +272,16 @@ $(document).ready(function () {
// Serialize the data
var post = $("#languageinput").serialize();
// Ajax foo
- $.post('ajax/setlanguage.php', post, function (data) {
- if (data.status === "success") {
- location.reload();
- }
- else {
- $('#passworderror').text(data.data.message);
+ $.ajax(
+ 'ajax/setlanguage.php',
+ {
+ method: 'POST',
+ data: post
}
+ ).done(function() {
+ location.reload();
+ }).fail(function(jqXHR) {
+ $('#passworderror').text(jqXHR.responseJSON.message);
});
return false;
});