anchor.diff:  
   
   
  -  ##
  -  # Changes the admin's view to the members list page
  -  ##
  -  $scope.cancel = ->
  -    $state.go('app.admin.members')
  -
  -
  -
  -  ##
  -  # Open a modal allowing to specify the data mapping for the given field
  -  ##
  -  $scope.defineDataMapping = (mapping) ->
  -    $uibModal.open
  -      templateUrl: '<%= asset_path "admin/authentications/_data_mapping.html" %>'
  -      size: 'md'
  -      resolve:
  -        field: -> mapping
  -        datatype: ->
  -          for field in $scope.mappingFields[mapping.local_model]
  -            if field[0] == mapping.local_field
  -              return field[1]
  -
  -      controller: ['$scope', '$uibModalInstance', 'field', 'datatype', ($scope, $uibModalInstance, field, datatype) ->
  -        ## parent field
  -        $scope.field = field
  -        ## expected data type
  -        $scope.datatype = datatype
  -
  -        ## close and save the modifications
  -        $scope.ok = ->
  -          console.log('TODO')
  -          $uibModalInstance.close()
  -
  -        ## do not save the modifications
  -        $scope.cancel = ->
  -          $uibModalInstance.dismiss()
  -      ]
  +  ## Using the AuthenticationController
  +  new AuthenticationController($scope, $state, $uibModal, mappingFieldsPromise)
   ]
   
   
  
positive.code:     , ->
        growl.error(_t('an_error_occurred_unable_to_update_the_provider'))
  
    ##
    # Changes the admin's view to the members list page
    ##
    $scope.cancel = ->
      $state.go('app.admin.members')
  
  ]
negative.code: ##
  # Page to edit an already added authentication provider
  ##
  Application.Controllers.controller "EditAuthenticationController", ["$scope", "$state", "$stateParams", "$rootScope", "$uibModal", "dialogs", "growl", 'providerPromise', 'mappingFieldsPromise', 'AuthProvider', '_t'
  , ($scope, $state, $stateParams, $rootScope, $uibModal, dialogs, growl, providerPromise, mappingFieldsPromise, AuthProvider, _t) ->
  
    ## parameters of the currently edited authentication provider
    $scope.provider = providerPromise
  
    $scope.mode = 'edition'
  
    ##
    # Update the current provider with the new inputs
  