summaryrefslogtreecommitdiffstats
path: root/app/views/imports/settings.html.erb
blob: 1342b55fbda42c87e8df86717820ee6e25ca823d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<h2><%= import_title %></h2>

<%= form_tag(import_settings_path(@import), :id => "import-form") do %>
  <fieldset class="box tabular">
    <legend><%= l(:label_options) %></legend>
    <p>
      <label for="import_settings_separator"><%= l(:label_fields_separator) %></label>
      <%= select_tag 'import_settings[separator]',
            options_for_select([[l(:label_comma_char), ','], [l(:label_semi_colon_char), ';']], @import.settings['separator']) %>
    </p>
    <p>
      <label for="import_settings_wrapper"><%= l(:label_fields_wrapper) %></label>
      <%= select_tag 'import_settings[wrapper]',
          options_for_select([[l(:label_quote_char), "'"], [l(:label_double_quote_char), '"']], @import.settings['wrapper']) %>
    </p>
    <p>
      <label for="import_settings_encoding"><%= l(:label_encoding) %></label>
      <%= select_tag 'import_settings[encoding]', options_for_select(Setting::ENCODINGS, @import.settings['encoding']) %>
    </p>
    <p>
      <label for="import_settings_date_format"><%= l(:setting_date_format) %></label>
      <%= select_tag 'import_settings[date_format]', options_for_select(date_format_options, @import.settings['date_format']) %>
    </p>
    <br>
    <p>
      <label for="import_settings_notifications"><%= l(:label_import_notifications) %></label>
      <%= hidden_field_tag 'import_settings[notifications]', '0', :id => nil %>
      <%= check_box_tag 'import_settings[notifications]', '1', "#{@import.settings['notifications']}" == '1' %>
    </p>
  </fieldset>
  <p><%= submit_tag l(:label_next).html_safe + " &#187;".html_safe, :name => nil %></p>
<% end %>