app/views/imports/new.html.erb
<nav>
<div>
Logged in as <%= link_to(current_user.username, edit_profile_path) %>
</div>
</nav>
<div class="setup" id="feed-setup">
<h1><%= t('import.title') %></h1>
<h2><%= t('import.subtitle') %></h2>
<hr />
<p>
<%= t('import.description') %>
</p>
<hr />
<%= form_with(url: "/feeds/import", id: "import", multipart: true) do %>
<input id="opml_file" name="opml_file" type="file" title="<%= t('import.fields.import') %>" aria-label="<%= t('import.fields.import') %>" class="btn-primary" />
<a href="/setup/tutorial" id="skip" class="btn pull-right"><%= t('import.fields.not_now') %></a>
<% end %>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#opml_file').on("filePicked", function(e) {
$('form#import').submit();
});
});
</script>