Commit 8afe8ef
committed
Add locale support on custom import view*
Should update it on the project page in Example9 on http://fivell.github.io/active_admin_import/
```
<p>
<%= raw(@active_admin_import_model.hint) %>
</p>
<%= semantic_form_for @active_admin_import_model, url: {action: :do_import}, html: {multipart: true} do |f| %>
<%= f.inputs do %>
<%= f.input :file, as: :file, label: t('active_admin_import.file') %>
<% end %>
<%= f.inputs t("active_admin_import.csv_options"), for: [:csv_options, OpenStruct.new(@active_admin_import_model.csv_options)] do |csv| %>
<% csv.with_options input_html: {style: 'width:40px;'} do |opts| %>
<%= opts.input :col_sep, label: t("active_admin_import.col_sep") %>
<%= opts.input :row_sep, label: t("active_admin_import.row_sep") %>
<%= opts.input :quote_char, label: t("active_admin_import.quote_char") %>
<% end %>
<% end %>
<%= f.actions do %>
<%= f.action :submit, label: t("active_admin_import.import_btn"), button_html: {disable_with: t("active_admin_import.import_btn_disabled")} %>
<% end %>
<% end %>
```
Conflicts:
config/locales/en.yml1 parent 3809ca9 commit 8afe8ef
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments