ActiveAdmin.register Ban do
  menu :priority => 22 #,:parent => "Bots"


  index do
    column :id
    column :frequency, :sortable => :frequency_id
    column :hostmask
    column :reason
    column :valid_from
    column :valid_to
    column :activate
    column :created_at
    column :updated_at
    default_actions
  end

  form do |f|

    f.inputs "Details" do
      f.input :frequency, :as => :select, :member_label => :name  # https://github.com/justinfrench/formtastic/blob/master/lib/formtastic/inputs/select_input.rb
      f.input :hostmask
      f.input :reason
      f.input :valid_from, :as => :datetime_picker
      f.input :valid_to, :as => :datetime_picker
      f.input :activate, :input_html => { :checked => 'checked' }
    end
    f.buttons
  end


end
