diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-05 22:09:38 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-06 14:05:53 +0100 |
commit | 78efb1972e7d3153e431dcda804e4c038ffb5ddf (patch) | |
tree | 0130f6ad25e9d1c31eaecb43a7efbfd5020324ef /settings/js/personal.js | |
parent | 95a8964cc87afc6ed9b08502b53e683fbaa63e03 (diff) | |
download | nextcloud-server-78efb1972e7d3153e431dcda804e4c038ffb5ddf.tar.gz nextcloud-server-78efb1972e7d3153e431dcda804e4c038ffb5ddf.zip |
Fix route and js
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'settings/js/personal.js')
-rw-r--r-- | settings/js/personal.js | 15 |
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; }); |