Merge pull request #1997 from emanuelschuetze/fix1817
Get success message in user edit form when default password is resetted
This commit is contained in:
commit
e57a83f45b
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user