<%= render :partial => "submenu" %>

<div id="main"><!-- メイン -->

<h2>仕入先入力確認</h2>
<%= flash[:notice] %>
<%= flash[:errors] %>
<%= error_messages_for :supplier %>

<p class="req"><span class="pnt">※</span>は必須入力です</p>

<% form_for :supplier do |f| %>
  <%= render :partial => "form", :locals => {:f => f} %>
<% end %>
<div class="btn_box">
<% form_for([:admin, @supplier],:url=>{:action => ( !params[:id].blank? ? "update" : "create" ), :id => @supplier}, :html=>{:method => ( !params[:id].blank? ? "put" : "post" )}) do%>
  <% @supplier.attribute_names.each do | column | %>
    <%= hidden_field "supplier", column.to_s %>
  <% end %>
  <%= submit_tag 'この内容で登録する', :class => "btn"%><%= image_tag("btn_side.gif", :width => "6", :height => "34", :class => "btn_side", :alt => "") %>
<% end %>

<% form_for([:admin, @supplier],:url=>{:action => ( !params[:id].blank? ? "edit" : "new" ), :id => @supplier}, :html=>{:method => "get"}) do%>
  <% @supplier.attribute_names.each do | column | %>
    <%= hidden_field "supplier", column.to_s %>
  <% end %>
  <%= submit_tag '戻る', :class => "btn"%><%= image_tag("btn_side.gif", :width => "6", :height => "34", :class => "btn_side", :alt => "") %>
<% end %>
</div>

</div><!-- /メイン -->
