diff options
Diffstat (limited to 'settings/js/personal.js')
-rw-r--r-- | settings/js/personal.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js new file mode 100644 index 00000000000..f6b7eeb7584 --- /dev/null +++ b/settings/js/personal.js @@ -0,0 +1,35 @@ +$(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; + }); + + $("#languageinput").change( function(){ + // Serialize the data + var post = $( "#languageinput" ).serialize(); + // Ajax foo + $.post( 'ajax/setlanguage.php', post, function(data){ + if( data.status == "success" ){ + } + else{ + $('#passworderror').html( data.data.message ); + } + }); + return false; + }); +} ); |