<%= javascript_include_tag "admin/shop" %>

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

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

<h2>メール設定</h2>
<%=h flash[:mail] %>
<%=h flash[:mail_e] %>
<p class="req"><span class="pnt">※</span>は必須入力です</p>
<table class="data" cellspacing="1" cellpadding="0">
  <tr>
    <th>メールテンプレート <span class="pnt">※</span></th>
    <td><%=
        templates = MailTemplate.find(:all, :order=>"id").map {|rec| [rec.name, rec.id.to_s] }
        select :mail, :id, templates, {:include_blank => true},
            {:onChange => remote_function(:update=>'mail_edit',
            :url => {:action => 'mail_search'}, :with => "'id='+value",
            :before => "Form.disable('edit_form')",
            :complete => "Form.enable('edit_form')")} %>
    </td>
  </tr>
</table>
<% form_for :mail, :url => {:action => 'mail_update'}, :html => {:id => 'edit_form'} do |f| %>
  <div id="mail_edit">
  <%= render :partial => "mail_form", :locals => {:f => f}%>
  </div>
  <div class="btn_box">
    <%= f.submit 'この内容で登録する', :id => 'next_button', :confirm => '登録しても宜しいですか', :class=>"btn" %>
    <img class="btn_side" width="6" height="34" src="/images/btn_side.gif">
  </div>
<% end %>

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

