Fixes #9217 invite user form doesn't allow saving the password

The problem was that the directive was changed to a component and as such all things are named with vm which was not transitioned across for this form. There was also an issue with the avatar which is fixed too.
This commit is contained in:
Shannon
2020-10-20 11:47:41 +11:00
parent a3c40e0356
commit dce7076aab
2 changed files with 5 additions and 5 deletions

View File

@@ -164,7 +164,7 @@
function inviteSavePassword() {
if (formHelper.submitForm({ scope: $scope })) {
if (formHelper.submitForm({ scope: $scope, formCtrl: vm.inviteUserPasswordForm })) {
vm.invitedUserPasswordModel.buttonState = "busy";
@@ -172,7 +172,7 @@
.then(function (data) {
//success
formHelper.resetForm({ scope: $scope });
formHelper.resetForm({ scope: $scope, formCtrl: vm.inviteUserPasswordForm });
vm.invitedUserPasswordModel.buttonState = "success";
//set the user and set them as logged in
vm.invitedUser = data;
@@ -181,7 +181,7 @@
vm.inviteStep = 2;
}, function (err) {
formHelper.resetForm({ scope: $scope, hasErrors: true });
formHelper.resetForm({ scope: $scope, hasErrors: true, formCtrl: vm.inviteUserPasswordForm });
formHelper.handleError(err);
vm.invitedUserPasswordModel.buttonState = "error";
});

View File

@@ -10,7 +10,7 @@
<div ng-if="!vm.denyLocalLogin" ng-show="vm.invitedUser != null" class="umb-login-container">
<form name="inviteUserPasswordForm" novalidate="" ng-submit="vm.inviteSavePassword()" val-form-manager>
<form name="vm.inviteUserPasswordForm" novalidate="" ng-submit="vm.inviteSavePassword()" val-form-manager>
<div class="form" ng-if="vm.inviteStep === 1">
<h1 style="margin-bottom: 10px; text-align: left;">Hi, {{vm.invitedUser.name}}</h1>
<p style="line-height: 1.6; margin-bottom: 25px;">
@@ -79,7 +79,7 @@
size="xl"
unknown-char="+"
img-src="{{vm.invitedUser.avatars[3]}}"
img-srcset="{{vm.invitedUser.avatars[4]}} 2x, {{invitedUser.avatars[4]}} 3x">
img-srcset="{{vm.invitedUser.avatars[4]}} 2x, {{vm.invitedUser.avatars[4]}} 3x">
</umb-avatar>
</a>