Skip to content

Commit

Permalink
Improve file upload example
Browse files Browse the repository at this point in the history
Uncheck the "Remove file" checkbox, in case it was previously checked.
  • Loading branch information
amitaibu authored Aug 29, 2023
1 parent 5755990 commit 1daf70e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Guide/file-storage.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,10 @@ $(document).on('ready turbolinks:load', () => {

$(this).closest('.file-upload-wrapper')
.find('.remove-file-wrapper')
.toggleClass('hidden', !$this.val());
.toggleClass('hidden', !$this.val())
// Uncheck the "Remove file" checkbox, in case it was previously checked.
.find(':checkbox')
.prop('checked', false);
});

// Hide the file upload wrapper if the remove file checkbox is checked.
Expand Down

0 comments on commit 1daf70e

Please sign in to comment.