<% data = action_data @ask_question = data["ask_question"] @categories = data["categories"] @module_app = data["module_app"] %> <%= javascript_include_tag 'validator' %>
<%= form_for @ask_question, url: asks_path, html: {class: 'form-horizontal'} do |f| %>
<%= f.label :ask_category_id, class: 'control-label required' %>
<%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %>
<%= f.label :name, class: 'control-label required' %>
<%= f.text_field :name, data: {"fv-validation" => "required;", "fv-messages" => "必填欄位;"} %>
<%= f.label :identity, class: 'control-label required' %>
<%= f.select :identity, options_for_select( [t('ask.teacher'), t('ask.stuff'), t('ask.student'), t('ask.schoolfellow'), t('ask.others')].map{|i| [i, i]} ) %>
<%= f.label :mail, class: 'control-label required' %>
<%= f.text_field :mail, data: {"fv-validation" => "required;check_email;", "fv-messages" => "必填欄位;Email不正確;"} %>
<%= f.label :phone, class: 'control-label' %>
<%= f.text_field :phone %>
<%= f.label :fax, class: 'control-label' %>
<%= f.text_field :fax %>
<%= f.label :title, class: 'control-label required' %>
<%= f.text_field :title, data: {"fv-validation" => "required;", "fv-messages" => "必填欄位;"} %>
<%= f.label :content, class: 'control-label required' %>
<%= f.text_area :content, rows: 8, class: 'input-xlarge' %>
<%= f.label :recaptcha, class: 'control-label' %>
<%= gotcha_error %> <%= gotcha %>
"> <%= f.submit t('submit'), class: 'btn btn-primary', :id => 'button-mail' %> <%= f.button t('cancel'), type: 'reset', class: 'btn' %>
<% end %>