 # Search controller
 # ---------------------------------------------------------------------------
 
-SearchCtrl = ($scope, pwgAjax, pwgFlash, pwgTimeout) ->
+SearchCtrl = ($scope, pwgAjax, pwgFlash, pwgTimeout, pwgModal) ->
   $scope.searchTerm        = null
   $scope.searchResults     = null
   $scope.searchDescription = true

        doSearch()

  deleteEntry = (pw) ->
    $scope.confirm("Really delete #{pw.name}?", "Confirm deletion").then (result) ->
      url = routes.controllers.PasswordEntryController.delete(pw.id).url
      pwgAjax.delete url, ->
        reissueLastSearch()

pwguardApp.controller 'AdminUsersCtrl', ['$scope',
                                         'pwgAjax',
                                         'pwgFlash',
                                         'pwgModal',
                                         AdminUsersCtrl]
