|
@@ -28,7 +28,9 @@ define [
|
|
|
App.controller "DeleteAccountModalController", [
|
|
App.controller "DeleteAccountModalController", [
|
|
|
"$scope", "$modalInstance", "$timeout", "$http",
|
|
"$scope", "$modalInstance", "$timeout", "$http",
|
|
|
($scope, $modalInstance, $timeout, $http) ->
|
|
($scope, $modalInstance, $timeout, $http) ->
|
|
|
- $scope.state =
|
|
|
|
|
|
|
+ $scope.state =
|
|
|
|
|
+ isValid : false
|
|
|
|
|
+ deleteText: ""
|
|
|
inflight: false
|
|
inflight: false
|
|
|
|
|
|
|
|
$modalInstance.opened.then () ->
|
|
$modalInstance.opened.then () ->
|
|
@@ -36,6 +38,9 @@ define [
|
|
|
$scope.$broadcast "open"
|
|
$scope.$broadcast "open"
|
|
|
, 700
|
|
, 700
|
|
|
|
|
|
|
|
|
|
+ $scope.checkValidation = ->
|
|
|
|
|
+ $scope.state.isValid = $scope.state.deleteText == "DELETE"
|
|
|
|
|
+
|
|
|
$scope.delete = () ->
|
|
$scope.delete = () ->
|
|
|
$scope.state.inflight = true
|
|
$scope.state.inflight = true
|
|
|
|
|
|