Get success message in user edit form when default password is resetted (Fixes #1817).
This commit is contained in:
parent
73cc1a5dfb
commit
bed96f66b0
@ -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