mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 06:10:54 +03:00
WebClient: clear file upload list on explicit cancel
Avoid clearing the file list every time the modal is opened, as the modal might be closed unintentionally (e.g., by clicking outside it) Fixes #1981 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -2248,6 +2248,9 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
||||
uploadFiles(dropzone.getAcceptedFiles());
|
||||
}
|
||||
});
|
||||
$("#upload_files_cancel").click(function(){
|
||||
dropzone.removeAllFiles();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2500,7 +2503,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer border-0">
|
||||
<button data-i18n="general.cancel" type="button" class="btn btn-light me-5" data-bs-dismiss="modal">Cancel</button>
|
||||
<button data-i18n="general.cancel" type="button" id="upload_files_cancel" class="btn btn-light me-5" data-bs-dismiss="modal">Cancel</button>
|
||||
<button data-i18n="general.submit" type="button" id="upload_files_button" class="btn btn-primary" data-bs-dismiss="modal">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user