Commit 1615e706 authored by Randall Leeds's avatar Randall Leeds

Set pristine forms on auth reset

Relates to #1200
parent 03f52cc2
......@@ -703,7 +703,10 @@ class Auth
constructor: (
$scope, authentication
) ->
_reset = => angular.copy @scope, $scope.model
_reset = =>
angular.copy @scope, $scope.model
for own _, ctrl of $scope when typeof ctrl?.$setPristine is 'function'
ctrl.$setPristine()
$scope.$on '$reset', _reset
......@@ -713,8 +716,6 @@ class Auth
authentication["$#{form.$name}"] ->
_reset()
$scope.$emit 'success', form.$name
for own _, ctrl of $scope when typeof ctrl?.$setPristine is 'function'
ctrl.$setPristine()
class Editor
......
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