kinduff/spree_reffiliate

View on GitHub
app/views/spree/admin/affiliates/new.html.erb

Summary

Maintainability
Test Coverage
<% content_for :page_title do %>
  <%= Spree.t(:new_affiliate) %>
<% end %>

<% content_for :page_actions do %>
  <li>
    <%= button_link_to Spree.t(:back_to_affiliates_list), spree.admin_affiliates_path, :icon => 'arrow-left' %>
  </li>
<% end %>

<div data-hook="admin_affiliate_new_form_header">
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @affiliate } %>
</div>

<div data-hook="admin_affiliate_new_form">
  <%= form_for [:admin, @affiliate], url: admin_affiliates_url, method: :post do |f| %>
    <%= render :partial => 'form', :locals => { :f => f } %>

    <div data-hook="admin_affiliate_new_form_buttons">
      <%= render :partial => 'spree/admin/shared/new_resource_links' %>
    </div>
  <% end %>
</div>