+ changePassword: function(oldpassword, newpassword) {
+ var req = new enyo.Ajax({
+ url: baseURL + '/passwd',
+ method: 'POST',
+ postBody: {
+ username: blerg.API.username,
+ password: oldpassword,
+ new_password: newpassword
+ }
+ });
+ req.response(this, function(inSender, inResponse) {
+ if (inResponse.status == 'success') {
+ this.bubble('onPasswordChangeSuccessful');
+ } else {
+ this.bubble('onPasswordChangeFailed');
+ }
+ });
+ req.error(this, function() {
+ this.bubble('onPasswordChangeFailed');
+ });
+ req.go();
+ },