                 us = $model.$modelValue.clone()
                 us.client_requirement = not us.client_requirement
                 $model.$setViewValue(us)
+                $loading.start($el.find("label"))
                 promise = $tgrepo.save($model.$modelValue)
                 promise.then ->
+                    $loading.finish($el.find("label"))
                     $rootscope.$broadcast("history:reload")
+                    refresh(us)
                 promise.then null, ->
+                    $loading.finish($el.find("label"))
                     $confirm.notify("error")
                     us.revert()
                     $model.$setViewValue(us)
+                    refresh(us)
 
     return {
         link: link
         restrict: "EA"
         require: "ngModel"
     }
-module.directive("tgUsClientRequirementButton", ["$rootScope", "$tgRepo", "$tgConfirm", UsClientRequirementButtonDirective])
+module.directive("tgUsClientRequirementButton", ["$rootScope", "$tgRepo", "$tgConfirm", "$tgLoading", UsClientRequirementButtonDirective])

        require: "ngModel"
    }

module.directive("tgUsTeamRequirementButton", ["$rootScope", "$tgRepo", "$tgConfirm", UsTeamRequirementButtonDirective])


#############################################################################
## User story client requirements button directive
#############################################################################

UsClientRequirementButtonDirective = ($rootscope, $tgrepo, $confirm) ->
    template = _.template("""
      <label for="client-requirement" class="button button-gray client-requirement">Client requirement</label>
      <input type="checkbox" id="client-requirement" name="client-requirement"/>

## User story team requirements button directive
#############################################################################

UsTeamRequirementButtonDirective = ($rootscope, $tgrepo, $confirm, $loading) ->
    template = _.template("""
      <label for="team-requirement" class="button button-gray team-requirement">Team requirement</label>
      <input type="checkbox" id="team-requirement" name="team-requirement"/>
