-
Notifications
You must be signed in to change notification settings - Fork 2
Add file upload option for bulk import #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Clear file name and input on modal close Add file name and display when selecting a new file Smoothly replace textarea contents with file contents Restrict file extensions to .txt and .json Fixes wustep#37
margin: 1rem; | ||
} | ||
|
||
.file-name { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep the naming convention of BulkImportModal__fileName
<label class="label">Import from File</label> | ||
<div id="BulkImport__file" class="file is-normal"> | ||
<label class="file-label"> | ||
<input class="file-input" type="file" accept=".json, .txt" name="resume"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name probably doesn't do anything here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can add an ID here BulkImportModal__fileInput
$('#BulkExportModal').removeClass('is-active'); | ||
}); | ||
$('#BulkImportModal__cancel, #BulkImportModal__close').on('click', (e) => { | ||
$('.file-input').val(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use convention
Clear file name and input on modal close
Add file name and display when selecting a new file
Smoothly replace textarea contents with file contents
Restrict file extensions to .txt and .json
Demo:
bulk-import-file-upload.mp4
Fixes #37