<fieldset id="action_fields">
  <legend><%= t(:promotion_actions) %></legend>

  <%= form_for @promotion, :url => spree.admin_promotion_path(@promotion), :method => :put do |f| %>
    <div id="actions" class="filter_list">
      <% if @promotion.actions.any? %>
        <%= render :partial => 'promotion_action',  :collection => @promotion.actions %>
      <% else %>
        <!-- <p><%= t(:no_actions_added) %></p> -->
      <% end %>
    </div>
    <p class="form-buttons">
      <%= button t(:update) %>
    </p>
  <% end %>

  <%= form_tag spree.admin_promotion_promotion_actions_path(@promotion), :remote => true, :id => 'new_promotion_action_form' do %>
    <% options = options_for_select(  Rails.application.config.spree.promotions.actions.map(&:name).map {|name| [ t("promotion_action_types.#{name.demodulize.underscore}.name"), name] } ) %>
    <p>
      <%= label_tag :action_type, t(:add_action_of_type) %>
      <%= select_tag 'action_type', options %>
      <%= submit_tag t(:add) %>
    </p>
  <% end %>

</fieldset>
