<%= fi.input :visibility, collection: [ ['Public', 'open'], ['Private', 'restricted'], ['Institution', 'authenticated'] ], selected: importer.parser_fields['visibility'] || 'open', input_html: { class: 'form-control' } %> <% if defined?(::Hyrax) %> <% rights_statements = Hyrax.config.rights_statement_service_class.new %> <%= fi.input :rights_statement, collection: rights_statements.select_active_options, selected: importer.parser_fields['rights_statement'], include_blank: true, item_helper: rights_statements.method(:include_current_value), input_html: { class: 'form-control' }, required: false %> <%= fi.input :override_rights_statement, as: :boolean, hint: 'If checked, always use the selected rights statment. If unchecked, use rights or rights_statement from the record and only use the provided value if dc:rights is blank.', input_html: { checked: (importer.parser_fields['override_rights_statement'] == "1") } %> <% end %>

Add CSV File to Import:

<%# accept a single file upload; data files and bags will need to be added another way %> <% file_style_list = ['Upload a File', 'Specify a Path on the Server'] %> <% file_style_list << 'Existing Entries' unless importer.new_record? %> <%= fi.input :file_style, collection: file_style_list, as: :radio_buttons, label: false %>
<%= fi.input 'file', as: :file, input_html: { accept: 'text/csv,application/zip' } %>
<%= fi.input :import_file_path, as: :string, input_html: { value: importer.parser_fields['import_file_path'] } %>
<%= fi.collection_check_boxes :entry_statuses, [['Failed'], ['Pending'], ['Skipped'], ['Deleted'], ['Complete']], :first, :first %>
<% if defined?(::Hyrax) && Hyrax.config.browse_everything? %>

Add Files to Import:

Choose files to upload. The filenames must be unique, and the filenames must be referenced in a column called 'file' in the accompanying CSV file.

<%= render 'browse_everything', form: form %> <% end %>