Merge pull request #1997 from emanuelschuetze/fix1817

Get success message in user edit form when default password is resetted
This commit is contained in:
Norman Jäckel 2016-02-24 00:45:05 +01:00
commit e57a83f45b

View File

@ -318,11 +318,17 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
type: 'input',
templateOptions: {
label: gettextCatalog.getString('Default password'),
description: '',
addonRight: { text: 'Reset', class: 'fa fa-undo', onClick:
function (options, scope) {
$http.post(
'/rest/users/user/' + scope.model.id + '/reset_password/',
{'password': scope.model.default_password})
.then(function() {
options.templateOptions.description =
gettextCatalog.getString('Password successfully resetted to:') +
' ' + scope.model.default_password;
});
}
}
}