         $scope.$on "taskform:edit", (ctx, task) ->
             $scope.task = task
             isNew = false
+
             # Update texts for edition
             $el.find(".button-green span").html("Save") #TODO: i18n
             $el.find(".title").html("Edit task  ") #TODO: i18n

            projectId = $scope.projectId
            usId = $scope.form.usId

            $rs.tasks.bulkCreate(projectId, usId, data).then (result) ->
                $rootscope.$broadcast("taskform:bulk:success", result)
                $el.addClass("hidden")

                promise = $repo.save($scope.task)
                broadcastEvent = "taskform:edit:success"

            # FIXME: error handling?
            promise.then (data) ->
                $el.addClass("hidden")
                $rootScope.$broadcast(broadcastEvent, data)
