<% fields_for :customer do |f| %>
 <span style="color:#ff0000;">※</span>都道府県<br />
 <%= f.collection_select :prefecture_id, Prefecture.find(:all, :order=>:position), :id, :name %><br /><br />
<span style="color:#ff0000;">※</span>市区町村<br />
 <%= f.text_field :address_city, :size => 30, :style => "height:14px;" %><br /><br />
<span style="color:#ff0000;">※</span>番地以降<br />
 <%= f.text_field :address_detail, :size => 30, :style => "height:14px;" %><br /><br />
 <span style="color:#ff0000;">※</span>電話番号<br />
 <%= f.text_field :tel01, {:size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %>-<%= f.text_field :tel02, {:size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %>-<%= f.text_field :tel03, {:size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %><br />
 <br />
 職業<br />
 <%= f.collection_select :occupation_id, Occupation.find(:all, :order=>:position), :id, :name %><br />
 <span style="color:#ff0000;">※</span>メールマガジン送付について<br />
  <% [Customer::HTML_MAIL, Customer::TEXT_MAIL, Customer::NO_MAIL].each_with_index do | value,index | %>
  <% label = Customer::MAILMAGAZINE_NAMES[value] %>
	  <% if index == 0 %>
      <%= f.radio_button :receive_mailmagazine, value, {:checked=>true} %>
		<% else %>
      <%= f.radio_button :receive_mailmagazine, value %>
		<% end %>
   <%= content_tag :label, label, :for => "customer_receive_mailmagazine_%d" % value %><br />
  <% end %><br />
<div style="text-align:center;">
  <%= submit_tag '戻る', :name=>'back' %>
  <%= submit_tag '確認ページへ' %>
</div><br />

<%# 前のページまでで入力されたものを hidden で置く %>
<%
 # TODO: これを自動で出したい
 names = [
   :sex,
   :birthday,
   :zipcode01,
   :zipcode02,
   :email,
   :email_confirm,
   :raw_password,
   :password_confirm,
   :family_name,
   :first_name,
   :family_name_kana,
   :first_name_kana
 ].reject{|name|@customer.send(name).blank?}
%>
<%= names.map{|name|hidden_field(:customer, name, :object => @customer)} %>
<%= hidden_field_tag 'done', 1 %>
<% end %>
