class @SupportToolsUser
  reset = ->
    job_val = $('#job_type').val()
    switch job_val
      when 'tos_ban'
        $('#content').removeClass 'hidden'
        $('#description').removeClass 'hidden'
        $('#reason').removeClass 'hidden'
        $('#detailed_reason').removeClass 'hidden'
        $('#duration').removeClass 'hidden'
        $('#ban_options').removeClass 'hidden'
      else
        $('#content').addClass 'hidden'
        $('#description').addClass 'hidden'
        $('#reason').addClass 'hidden'
        $('#detailed_reason').addClass 'hidden'
        $('#duration').addClass 'hidden'
        $('#ban_options').addClass 'hidden'

  disableDuration = ->
    is_permanent = $('#support_tools_user_job_is_permanent').is(':checked')
    switch is_permanent
      when true
        $('#support_tools_user_job_duration').attr('disabled', 'disabled')
      else
        $('#support_tools_user_job_duration').removeAttr('disabled')
  @init: ->
    $('#job_type').change reset
    $('#support_tools_user_job_is_permanent').change disableDuration
    reset()
