app/views/imports/_form.html.slim
= simple_form_for import, as: :import, url: workbench_imports_path(workbench), html: {class: 'form-horizontal', id: 'wb_import_form'}, wrapper: :horizontal_form do |form|
.row
.col-lg-12
= form.input :name
.row
.col-lg-12
= form.input :file, label: t('activerecord.attributes.import.resources'), wrapper: :horizontal_file_input
.row.options-separator
.col-xs-offset-1.col-xs-11
.definition-list
.dl-head
.row
label.col-sm-2.col-xs-2
= "Options"
.row
.col-lg-12 x-data="{ import_category: 'automatic'}"
= form.input :notification_target, collection: Import::Base.notification_target_options, selected: :user
- import.class.options.each do |attr, option_def|
- next if (attr == :merge_method)
- if resource_policy.option?(attr)
= option_input form, import, attr, option_def, import.class
- if has_feature?("import_with_code_space")
= form.association :code_space, collection: workbench.workgroup.code_spaces, include_blank: false, required: false
= cancel_button
= form.button :submit, t('actions.submit'), class: 'btn btn-default formSubmitr', form: 'wb_import_form'