div(ng-if='task._editing')
  .task-options

    // Broken Challenge
    .well(ng-if='task.challenge.broken')
      div(ng-if='task.challenge.broken=="TASK_DELETED" || task.challenge.broken=="CHALLENGE_TASK_NOT_FOUND"')
        p=env.t('brokenTask')
        p
          a(ng-click='unlink(task, "keep")')=env.t('keepIt')
          | &nbsp;&nbsp;
          a(ng-click="removeTask(task, obj)")=env.t('removeIt')
      div(ng-if='task.challenge.broken=="CHALLENGE_DELETED"')
        p
          |&nbsp;
          =env.t('brokenChallenge')
        p
          a(ng-click='unlink(task, "keep-all")')=env.t('keepThem')
          | &nbsp;|&nbsp;
          a(ng-click='unlink(task, "remove-all")')=env.t('removeThem')
      div(ng-if='task.challenge.broken=="CHALLENGE_CLOSED"')
        p
          !=env.t('challengeCompleted', {user: "{{task.challenge.winner}}"})
        p
          a(ng-click='unlink(task, "keep-all")')=env.t('keepThem')
          | &nbsp;|&nbsp;
          a(ng-click='unlink(task, "remove-all")')=env.t('removeThem')
      //div(ng-if='task.challenge.broken=="UNSUBSCRIBED"')
        p=env.t('unsubChallenge')
        p
          a(ng-click="unlink(task, 'keep-all')")=env.t('keepThem')
          | &nbsp;|&nbsp;
          a(ng-click="unlink(task, 'remove-all')")=env.t('removeThem')

    include ./checklist

    form(ng-submit='saveTask(task,false,true)')
      include ./text_notes

      include ./habits/plus_minus

      include ./dailies/calendar

      include ./rewards/pricing

      include ./todos/due_date

      include ./tags

      include ./advanced_options

      .save-close
        button(type='submit')=env.t('saveAndClose')
