<%= t('page.new', model: t('activerecord.models.resource_import_file')) -%>

<%= form_for(@resource_import_file, html: { multipart: true }) do |f| -%> <%= f.error_messages -%>
<%= f.label t('page.file') -%>
<%= f.file_field :resource_import -%>
<%= f.label :edit_mode -%>
<%= f.radio_button :edit_mode, 'create', checked: 'checked' %> <%= f.label :edit_mode, t('page.create'), value: 'create' %> <%= f.radio_button :edit_mode, 'update' %> <%= f.label :edit_mode, t('page.update'), value: 'update' %> <%= f.radio_button :edit_mode, 'update_relationship' %> <%= f.label :edit_mode, t('resource_import_file.update_relationship'), value: 'update_relationship' %>
<%= f.label :user_encoding -%>
<%= f.radio_button :user_encoding, 'auto_detect', checked: 'checked' %> <%= f.label :user_encoding, t('import.auto_detect'), value: 'auto_detect' %> <%= f.radio_button :user_encoding, 'utf-8' %> <%= f.label :user_encoding, 'UTF-8', value: 'utf-8' %> <%= f.radio_button :user_encoding, 'shift_jis' %> <%= f.label :user_encoding, 'Shift_JIS', value: 'shift_jis' %> <%= f.radio_button :user_encoding, 'euc-jp' %> <%= f.label :user_encoding, 'EUC-JP', value: 'euc-jp' %>
<%= f.label :default_shelf_id -%> <%= f.select :library_id, @libraries.map{|l| [l.display_name.localize, l.id]} %> <%= f.select :default_shelf_id, @shelves.map{|s| [s.display_name.localize, s.id]} %> <%= render 'observe_field' %>
<%= t('resource_import_file.default_shelf') %>
<%= f.hidden_field :mode, value: 'import' %> <%= f.submit t('page.start_import') %>
<%- end -%>