Add email change fields to user edit form

This commit is contained in:
Johannes Zellner
2016-01-25 14:28:47 +01:00
parent dc83ba2686
commit 55a56355d5
3 changed files with 57 additions and 0 deletions

View File

@@ -25,6 +25,15 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
sendInvite: true
};
$scope.useredit = {
busy: false,
error: {},
userInfo: {},
email: '',
displayName: '',
password: ''
};
$scope.isMe = function (user) {
return user.username === Client.getUserInfo().username;
};
@@ -106,6 +115,23 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
});
};
$scope.showUserEdit = function (userInfo) {
$scope.useredit.error.displayName = null;
$scope.useredit.error.email = null;
$scope.useredit.displayName = userInfo.displayName;
$scope.useredit.email = userInfo.email;
$scope.useredit.userInfo = userInfo;
$scope.useredit_form.$setPristine();
$scope.useredit_form.$setUntouched();
$('#userEditModal').modal('show');
};
$scope.doUserEdit = function () {
};
$scope.showUserRemove = function (userInfo) {
$scope.userremove.error.username = null;
$scope.userremove.error.password = null;