App.AboutController = Ember.Controller.extend
  feedback_sending: false
  feedback_received: false
  feedback: ''
  submission_error: ''

  actions:
    submitFeedback: ->
      delay = (ms, func) => setTimeout func.bind(@), ms
      unless @get('feedback')
        @set 'submission_error', t('about.feedback.empty_content')
        delay 2000, ->
          @set 'submission_error', ''
        return
      @set 'feedback_sending', true
      @send 'sendFeedback', @get('feedback'), (res)=>
        @set 'feedback', false
        @set 'feedback_sending', false
        @set 'feedback_received', true
