<%= form_for @banner, :url => path, :html => {:class => 'spud_banner_form', :target => 'spud_banners_upload_target'} do |f| %> <%= error_messages_for(f.object) %>
<%= f.label :banner, 'Banner', :class => 'control-label' %>
<%= f.file_field :banner %>
<% if @banner.owner.has_rich_text? %>
<%= f.label :rich_text, 'Rich Text', :class => 'control-label' %>
<%= f.text_area :rich_text, :class => 'spud_banner_rich_text' %>
<% else %>
<%= f.label :link_to, 'Link to', :class => 'control-label' %>
<%= f.text_field :link_to %>
<%= f.label :link_target, 'Open Link in', :class => 'control-label' %>
<%= f.select :link_target, options_for_select([ ['Same Window', '_self'], ['New Window', '_blank'] ], @banner.link_target) %>
<%= f.label :title, 'Image Title', :class => 'control-label' %>
<%= f.text_field :title %>
<%= f.label :alt, 'Alt Text', :class => 'control-label' %>
<%= f.text_field :alt %>
<% end %>
<%= f.label :start_date, 'Start Date', :class => 'control-label' %>
<%= f.date_select :start_date, :start_year => Date.today.year %>
<%= f.label :end_date, 'End Date', :class => 'control-label' %>
<%= f.date_select :end_date, :include_blank => true, :start_year => Date.today.year %> Leave blank to never expire
<% end %>