Skip to content

Commit 732c910

Browse files
committed
corrected buggy modal from uploader.vue and corrected linting
1 parent 2884bd0 commit 732c910

File tree

1 file changed

+15
-3
lines changed
  • contentcuration/contentcuration/frontend/shared/views/files

1 file changed

+15
-3
lines changed

contentcuration/contentcuration/frontend/shared/views/files/Uploader.vue

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,21 @@
2626
v-if="showUnsupportedFilesAlert"
2727
:title="$tr('unsupportedFilesHeader')"
2828
:submitText="$tr('closeButtonLabel')"
29-
@submit="showUnsupportedFilesAlert = false"
29+
@submit="
30+
showUnsupportedFilesAlert = false;
31+
resetFileInput();
32+
"
3033
>
3134
<p>{{ unsupportedFilesText }}</p>
3235
</KModal>
3336
<KModal
3437
v-if="showTooLargeFilesAlert"
3538
:title="$tr('tooLargeFilesHeader')"
3639
:submitText="$tr('closeButtonLabel')"
37-
@submit="showTooLargeFilesAlert = false"
40+
@submit="
41+
showTooLargeFilesAlert = false;
42+
resetFileInput();
43+
"
3844
>
3945
<p>
4046
{{
@@ -49,7 +55,10 @@
4955
v-if="showStorageExceededAlert"
5056
:title="$tr('noStorageHeader')"
5157
:submitText="$tr('closeButtonLabel')"
52-
@submit="showStorageExceededAlert = false"
58+
@submit="
59+
showStorageExceededAlert = false;
60+
resetFileInput();
61+
"
5362
>
5463
<div class="storage-alert">
5564
<p>{{ $tr('uploadSize', { size: formatFileSize(totalUploadSize) }) }}</p>
@@ -255,6 +264,9 @@
255264
return fileUploads.filter(Boolean);
256265
});
257266
},
267+
resetFileInput() {
268+
this.$refs.fileUpload.value = '';
269+
},
258270
},
259271
$trs: {
260272
unsupportedFilesHeader: 'Unsupported files',

0 commit comments

Comments
 (0)