Skip to content

Conversation

bower28
Copy link
Collaborator

@bower28 bower28 commented Aug 6, 2023

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

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
@bower28 bower28 assigned bower28 and unassigned bower28 Aug 6, 2023
margin: 1rem;
}

.file-name {
Copy link
Owner

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">
Copy link
Owner

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

Copy link
Owner

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('');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use convention

@bower28 bower28 self-assigned this Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let Bulk Import support "uploading" a text file

2 participants