summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorJakob Sack <kde@jakobsack.de>2011-04-18 15:07:14 +0200
committerJakob Sack <kde@jakobsack.de>2011-04-18 15:07:14 +0200
commitb57823baa5d4f0d23be8d034550a0ffcb788a2ca (patch)
treebfae96c4e0e7b88b072379e3c2addf26a31561c0 /settings/js
parent46f1ea14c0af9f64722d44d9390d868c4e060c14 (diff)
downloadnextcloud-server-b57823baa5d4f0d23be8d034550a0ffcb788a2ca.tar.gz
nextcloud-server-b57823baa5d4f0d23be8d034550a0ffcb788a2ca.zip
Made the "change password" thingie in settings working
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/main.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/settings/js/main.js b/settings/js/main.js
new file mode 100644
index 00000000000..e05fc68743c
--- /dev/null
+++ b/settings/js/main.js
@@ -0,0 +1,21 @@
+$(document).ready(function(){
+ $("#passwordbutton").click( function(){
+ // Serialize the data
+ var post = $( "#passwordform" ).serialize();
+ $('#passwordchanged').hide();
+ $('#passworderror').hide();
+ // Ajax foo
+ $.post( 'ajax/changepassword.php', post, function(data){
+ if( data.status == "success" ){
+ $('#pass1').val('');
+ $('#pass2').val('');
+ $('#passwordchanged').show();
+ }
+ else{
+ $('#passworderror').html( data.data.message );
+ $('#passworderror').show();
+ }
+ });
+ return false;
+ });
+} );