Commit 8b253add authored by Randall Leeds's avatar Randall Leeds

Fix regression in auth sheet reset handling

parent 52673232
authentication = -> authentication = ->
base =
username: null
email: null
password: null
code: null
link: (scope, elem, attr, ctrl) ->
angular.copy base, scope.model
controller: [ controller: [
'$scope', 'authentication', '$scope', 'authentication',
($scope, authentication) -> ($scope, authentication) ->
$scope.$on '$reset', => angular.extend $scope.model, base $scope.$on '$reset', => angular.copy base, $scope.model
$scope.model = authentication
$scope.submit = (form) -> $scope.submit = (form) ->
angular.extend authentication, $scope.model
return unless form.$valid return unless form.$valid
authentication["$#{form.$name}"] -> authentication["$#{form.$name}"] ->
$scope.$emit 'success', form.$name $scope.$emit 'success', form.$name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment