From bed96f66b0e6b67e7af6eed7cf6f05b1162319e4 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Tue, 23 Feb 2016 23:51:42 +0100 Subject: [PATCH] Get success message in user edit form when default password is resetted (Fixes #1817). --- openslides/users/static/js/users/site.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openslides/users/static/js/users/site.js b/openslides/users/static/js/users/site.js index ca4a6d081..6b353a3e4 100644 --- a/openslides/users/static/js/users/site.js +++ b/openslides/users/static/js/users/site.js @@ -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; + }); } } }