ActiveAdmin.register JamRuby::InvitedUser do
  menu :label => 'Invite Users'

  config.sort_order = 'created_at'

   form :html => { :multipart => true }  do |f|
     f.inputs "Required Data" do
       f.input :email, :as => :email, :hint => "The email of the person you want to invite"
       f.input :sender,:as => :select,  :as => :select,  :collection => User.where('admin = true'), :value => nil, :hint => "If you are sending a personalized invitation, then select a user"
       f.input :autofriend, :hint => "Do you want the sender of this invite to be friends upon invitation acceptance?"

     end
      f.inputs "Optional Stuff" do
        f.input :note, :input_html => { :class => 'autogrow' }, :hint => "You can add a personalized note, if you wish"
      end

     f.buttons

   end

  #collection_action :upload_artifact, :method => :post do
  #    # Do some CSV importing work here...
  #    redirect_to :action => :index, :notice => "CSV imported successfully!"
  #end
end
