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',
|
type: 'input',
|
||||||
templateOptions: {
|
templateOptions: {
|
||||||
label: gettextCatalog.getString('Default password'),
|
label: gettextCatalog.getString('Default password'),
|
||||||
|
description: '',
|
||||||
addonRight: { text: 'Reset', class: 'fa fa-undo', onClick:
|
addonRight: { text: 'Reset', class: 'fa fa-undo', onClick:
|
||||||
function (options, scope) {
|
function (options, scope) {
|
||||||
$http.post(
|
$http.post(
|
||||||
'/rest/users/user/' + scope.model.id + '/reset_password/',
|
'/rest/users/user/' + scope.model.id + '/reset_password/',
|
||||||
{'password': scope.model.default_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