Merge branch 'capybara-fails' into bom

This commit is contained in:
Rob H
2014-03-28 13:52:17 +11:00
10 changed files with 132 additions and 66 deletions

View File

@@ -1,6 +1,21 @@
window.ForgotSidebarCtrl = Darkswarm.controller "ForgotSidebarCtrl", ($scope, $http, $location) ->
$scope.spree_user = {
email: null
}
$scope.active = ->
$location.path() == '/forgot'
$scope.select = ->
$location.path("/forgot")
$scope.submit = ->
if $scope.spree_user.email != null
$http.post("/user/spree_user/password", {spree_user: $scope.spree_user}).success (data)->
$location.path("/reset")
.error (data) ->
$scope.errors = "Email address not found"
else
$scope.errors = "You must provide an email address"