         template: template
     }
 
-module.directive("tgUsClientRequirementButton", ["$rootScope", "$tgRepo", "$tgConfirm", "$tgLoading", UsClientRequirementButtonDirective])
+module.directive("tgUsClientRequirementButton", ["$rootScope", "$tgRepo", "$tgConfirm", "$tgLoading",
+                                                 UsClientRequirementButtonDirective])

        require: "ngModel"
    }

module.directive("tgUsStatusButton", ["$rootScope", "$tgRepo", "$tgConfirm", "$tgLoading", UsStatusButtonDirective])


#############################################################################


            $el.find(".popover").popover().close()

            # NOTE: This block of code is strange and, sometimes, repetitive
            #       but is the only solution I find to update the object
            #       corectly
            us = angular.copy($model.$modelValue)
            points = _.clone($model.$modelValue.points, true)
            points[roleId] = pointId
            us.setAttr('points', points) if us.setAttr?
            us.points = points
            us.total_points = calculateTotalPoints(us)
            $model.$setViewValue(us)

            if saveAfterModify
                # Edit in the detail page
                $loading.start($el)

                onSuccess = ->
                    $confirm.notify("success")
                    $rootScope.$broadcast("history:reload")
                onError = ->
                    us.revert()
                    $model.$setViewValue(us)
                    $confirm.notify("error")
                $repo.save($model.$modelValue).then(onSuccess, onError)
            else
                # Create or eedit in the lightbox
