mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Merge pull request #223 from alphagov/fix-upload-not-submitting-bug
Reset file upload field when user navigates back
This commit is contained in:
@@ -11,6 +11,9 @@
|
|||||||
|
|
||||||
$form = $(component);
|
$form = $(component);
|
||||||
|
|
||||||
|
// Clear the form if the user navigates back to the page
|
||||||
|
$(window).on("pageshow", () => $form[0].reset());
|
||||||
|
|
||||||
// Need to put the event on the container, not the input for it to work properly
|
// Need to put the event on the container, not the input for it to work properly
|
||||||
$form.on('change', '.file-upload-field', this.submit);
|
$form.on('change', '.file-upload-field', this.submit);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user