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

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

  <h2>アイテムマスタ設定テンプレート</h2>  
  <h3>確認画面</h3>
  <br />
  <% form_for :service_cooperations_template do |f| %>
    <%= render :partial => "form", :locals => {:f => f} %>
  <% end %>

  <div class="btn_box">
    <%
      if params[:id].blank?
        url_state_next = {:action => "create"}
      else
        url_state_next = {:action => "update", :id => params[:id] }
      end
    %>
    <% form_for [:admin, @service_cooperations_template], :url => url_state_next, :html => {:method => "post"} do |f| %>

      <%= f.hidden_field :template_name %>
      <%= f.hidden_field :description %>
      <%= f.hidden_field :service_name %>
      <%= f.hidden_field :url_file_name %>
      <%= f.hidden_field :file_type %>
      <%= f.hidden_field :encode %>
      <%= f.hidden_field :newline_character %>
      <%= f.hidden_field :field_items %>
      <%= f.hidden_field :sql %>
      
      <%= f.submit "この内容で登録する", :class=>"btn" %>
      <%= image_tag("btn_side.gif", :width => "6", :height => "34", :class => "btn_side") %>
    <% end %>
    <%
      if params[:id].blank?
        url_state_back = {:action => "new"}
      else
        url_state_back = {:action => "edit", :id => params[:id] }
      end
    %>
    <% form_for [:admin, @service_cooperations_template], :url => url_state_back, :html => {:method => "post"} do |f| %>
      <%= f.hidden_field :template_name %>
      <%= f.hidden_field :description %>
      <%= f.hidden_field :service_name %>
      <%= f.hidden_field :url_file_name %>
      <%= f.hidden_field :file_type %>
      <%= f.hidden_field :encode %>
      <%= f.hidden_field :newline_character %>
      <%= f.hidden_field :field_items %>
      <%= f.hidden_field :sql %>

      <%= f.submit "戻る", :class=>"btn" %>
      <%= image_tag("btn_side.gif", :width => "6", :height => "34", :class => "btn_side") %>

    <% end %>
  </div>
</div>
