Skip to content

Commit

Permalink
Solved update button bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rmiccoli committed Dec 27, 2021
1 parent 9a71c84 commit ce50926
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@
return !self.enabled || !$scope.userUpdateForm.$dirty ||
$scope.userUpdateForm.name.$invalid ||
$scope.userUpdateForm.surname.$invalid ||
$scope.userUpdateForm.email.$invalid ||
$scope.userUpdateForm.username.$invalid ||
($scope.userUpdateForm.email.$invalid && $scope.userUpdateForm.email.$dirty) ||
($scope.userUpdateForm.username.$invalid && $scope.userUpdateForm.username.$dirty) ||
$scope.userUpdateForm.picture.$invalid;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h3 class="modal-title">Edit '{{$ctrl.oUser.name.formatted}}' account details</h
ng-show="userUpdateForm.picture.$dirty && userUpdateForm.picture.$error.url"> This field is not
a valid URL </span>
<span class="help-block"
ng-show="userUpdateForm.username.$dirty && userUpdateForm.username.$error.isImage"> This field
ng-show="userUpdateForm.picture.$dirty && userUpdateForm.picture.$error.isImage"> This field
is not a valid image </span>
</div>
<div class="col-sm-12">
Expand All @@ -174,4 +174,5 @@ <h3 class="modal-title">Edit '{{$ctrl.oUser.name.formatted}}' account details</h
<button class="btn btn-danger" type="button" name="dismiss" id="modal-btn-cancel"
ng-click="$ctrl.dismiss()">Cancel</button>
</div>

</form>

0 comments on commit ce50926

Please sign in to comment.