Ask user to type their email when deleting account, not "DELETE"

This commit is contained in:
Shane Kilkelly 2016-10-04 15:57:08 +01:00
parent ef1aab1c27
commit 73bb11e4a0

View file

@ -21,7 +21,8 @@ define [
$scope.deleteAccount = () ->
modalInstance = $modal.open(
templateUrl: "deleteAccountModalTemplate"
controller: "DeleteAccountModalController"
controller: "DeleteAccountModalController",
scope: $scope
)
]
@ -39,7 +40,7 @@ define [
, 700
$scope.checkValidation = ->
$scope.state.isValid = $scope.state.deleteText == "DELETE"
$scope.state.isValid = $scope.state.deleteText == $scope.email
$scope.delete = () ->
$scope.state.inflight = true
@ -56,4 +57,4 @@ define [
$scope.cancel = () ->
$modalInstance.dismiss('cancel')
]
]