<%= render :partial => "base/title", :locals => {:title => "お客様情報入力"} %>

<span style="color:#ff0000;">※</span>は必須項目です。<br /><br />

<%= flash[:notice] %>
<%= @temporary_customer && error_messages_for(:temporary_customer) %>
<%= @optional_address && error_messages_for(:optional_address) %>

<% form_tag({:action => 'delivery'}) do %>
  <% fields_for :temporary_customer do |f| %>

<span style="color:#ff0000;">※</span>お名前<br />
 &nbsp;姓<%= f.text_field :family_name, :tabindex => 1, :size => 10,:style=>"height:14px;" %><br />
 &nbsp;名<%= f.text_field :first_name, :tabindex => 2, :size => 10,:style=>"height:14px;" %><br /><br />
<span style="color:#ff0000;">※</span>お名前（フリガナ）<br />
 &nbsp;セイ<%= f.text_field :family_name_kana, {:tabindex => 3, :size => 10,:style=>"height:14px;"}.merge(mobile_input_mode(:hankakukana)) %><br />
 &nbsp;メイ<%= f.text_field :first_name_kana, {:tabindex => 4, :size => 10,:style=>"height:14px;"}.merge(mobile_input_mode(:hankakukana)) %><br /><br />

<span style="color:#ff0000;">※</span>郵便番号<br />
<%= f.text_field :zipcode01, {:tabindex => 5, :size => 7,:style=>"height:14px"}.merge(mobile_input_mode(:numeric)) -%>-<%= f.text_field :zipcode02, {:tabindex => 6, :size => 7,:style=>"height:14px"}.merge(mobile_input_mode(:numeric)) %><br />
<br />
<span style="color:#ff0000;">※</span>都道府県<br />
 <%= f.collection_select :prefecture_id, Prefecture.find(:all, :order=>:position), :id, :name ,{:tabindex => 8}%><br /><br />
<span style="color:#ff0000;">※</span>市区町村<br />
 <%= f.text_field :address_city, :tabindex => 9, :size => 30, :style => "height:14px;" %><br /><br />
<span style="color:#ff0000;">※</span>番地以降<br />
 <%= f.text_field :address_detail, :tabindex => 10, :size => 30, :style => "height:14px;" %><br /><br />

<span style="color:#ff0000;">※</span>メールアドレス<br />
<%= f.text_field :email, {:tabindex => 11, :size=>"30",:style=>"height:14px;"}.merge(mobile_input_mode(:alphabet)) %><br />
<span style="color:#ff0000;">※</span>メールアドレス確認<br />
<%= f.text_field :email_confirm, {:tabindex => 12, :size=>"30",:style=>"height:14px;"}.merge(mobile_input_mode(:alphabet)) %><br />
<br />

<span style="color:#ff0000;">※</span>電話番号<br />
<%= f.text_field :tel01, {:tabindex => 13, :size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %> - <%= f.text_field :tel02, {:tabindex => 14, :size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %> - <%= f.text_field :tel03, {:tabindex => 15, :size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %><br />
FAX<br />
<%= f.text_field :fax01, {:tabindex => 16, :size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %> - <%= f.text_field :fax02, {:tabindex => 17, :size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %> - <%= f.text_field :fax03, {:tabindex => 18, :size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %><br />
<span style="color:#ff0000;">※</span>性別<br />
<% [System::MALE, System::FEMALE].each do | value | %>
<%= f.radio_button :sex, value %>
<%= content_tag :label, System::SEX_NAMES[value], :for => "customer_sex_%d" % value %>
<% end %><br /><br />

職業<br />
<%= f.collection_select :occupation_id, Occupation.find(:all, :order=>:position), :id, :name,{:tabindex => 19,:prompt => "-" } %><br /><br />

生年月日<br />
<%= f.birthday_select :birthday, :use_month_numbers => true,:start_year =>Time.now.year-70,:end_year=>Time.now.year-10,:default=>{:year=>1980,:month=>1,:day=>1} %><br /><br />
<%= hidden_field_tag "temporary_customer_flag","1"%>
<% end%>

<div style="background-color:#F3F3EC;"><%= image_tag_mobile "spacer", :width => "1", :height => "2" %><br /></div>
<div style="clear:both; background-color:#F3F3EC; text-align:center;"><%= image_tag_mobile "border", :width => "226", :height => "2" %><br /></div>
<div style="background-color:#F3F3EC;"><%= image_tag_mobile "spacer", :width => "1", :height => "2" %><br /></div>

配送先を指定<%= check_box_tag 'address_enable', "1", ((params[:back] == "1" or @error_back)&& !params[:address_enable].nil?)?true:false,:tabindex => 20 %><br />
<span style="color:#ff0000;">※</span>上記に入力されたご住所と同一の場合はチェックをいれると省略可能です。<br /><br />

<% fields_for :optional_address do |f| %>
<span style="color:#ff0000;">※</span>お名前<br />
 &nbsp;姓<%= f.text_field :family_name, {:class => 'optional_address', :tabindex => 21, :size => 10,:style=>"height:14px;"} %><br />
 &nbsp;名<%= f.text_field :first_name, {:class => 'optional_address', :tabindex => 22, :size => 10,:style=>"height:14px;"} %><br /><br />
<span style="color:#ff0000;">※</span>お名前（フリガナ）<br />
 &nbsp;セイ<%= f.text_field :family_name_kana, {:class => 'optional_address', :tabindex => 23, :size => 10,:style=>"height:14px;"}.merge(mobile_input_mode(:hankakukana)) %><br />
 &nbsp;メイ<%= f.text_field :first_name_kana, {:class => 'optional_address', :tabindex => 24, :size => 10,:style=>"height:14px;"}.merge(mobile_input_mode(:hankakukana)) %><br /><br />

<span style="color:#ff0000;">※</span>郵便番号<br />
<%= f.text_field :zipcode01, {:class => 'optional_address', :tabindex => 25, :size => 7,:style=>"height:14px"}.merge(mobile_input_mode(:numeric)) -%>-<%= f.text_field :zipcode02, {:tabindex => 26, :size => 7,:style=>"height:14px"}.merge(mobile_input_mode(:numeric)) %><br />
<br />
<span style="color:#ff0000;">※</span>都道府県<br />
 <%= f.collection_select :prefecture_id, Prefecture.find(:all, :order=>:position), :id, :name ,{:class => 'optional_address', :tabindex => 28}%><br /><br />
<span style="color:#ff0000;">※</span>市区町村<br />
 <%= f.text_field :address_city, {:class => 'optional_address', :tabindex => 29, :size => 30, :style => "height:14px;"} %><br /><br />
<span style="color:#ff0000;">※</span>番地以降<br />
 <%= f.text_field :address_detail, {:class => 'optional_address', :tabindex => 30, :size => 30, :style => "height:14px;"} %><br /><br />

<span style="color:#ff0000;">※</span>電話番号<br />
<%= f.text_field :tel01, {:class => 'optional_address', :tabindex => 31, :size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %> - <%= f.text_field :tel02, {:class => 'optional_address', :tabindex => 32, :size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %> - <%= f.text_field :tel03, {:class => 'optional_address', :tabindex => 33, :size => 6, :style => "height:14px;"}.merge(mobile_input_mode(:numeric)) %><br /><br />
<% end %>
<div style="text-align:center;">
<%= submit_tag '次へ' %><br />
</div>
<% end %>
<div style="text-align:center;">
<%= button_to '戻る', :action=> "show" %><br />
</div>
