Skip to content

Commit 88ecbd4

Browse files
ipweblabVidas P
authored andcommitted
Allow only JSON files in the file input. Avoids errors & is more helpful
1 parent 23ee1fd commit 88ecbd4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/views/user_credentials/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
</div>
6565
<div class="modal-body">
6666
<p><em>Upload a credentials file that you have previously exported from an ActiveWorkflow instance.</em></p>
67-
<%= file_field_tag :file, class: 'form-control' %>
67+
<%= file_field_tag :file, accept: 'application/json', class: 'form-control' %>
6868
</div>
6969
<div class="modal-footer">
7070
<%= button_tag 'Cancel', class: 'btn btn-primary btn-sm', 'data-dismiss' => 'modal' %>

app/views/workflow_imports/_step_one.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div class="col-md-12">
1515
<div class="form-group">
1616
<pre>
17-
<%= f.file_field :file, :class => 'form-control-file' %>
17+
<%= f.file_field :file, accept: 'application/json', :class => 'form-control-file' %>
1818
</pre>
1919
</div>
2020

0 commit comments

Comments
 (0)