Merge pull request #44 from salmannotkhan/master

Set deletion error instead of appending it
This commit is contained in:
Andrea Spacca 2021-10-25 18:34:59 +02:00 committed by GitHub
commit 0297af4dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 67 additions and 65 deletions

File diff suppressed because one or more lines are too long

View File

@ -8,6 +8,7 @@
<input type="text" id="deletion-token" value="" placeholder="Please enter the deletion token">
<a href="#" id="confirm-delete" class="btn-cta btn"> confirm</i> </a> <br/><br/>
</div>
<div id="error"></div>
</div>
</div>
</div>

View File

@ -51,9 +51,10 @@ $(document).ready(function() {
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
deleteModal.find('#web').html('<span style="clear:both">File deleted</span></div>');
deleteModal.find('#web').html('<span style="clear:both">File deleted</span>');
deleteModal.find('#error').html('')
} else {
deleteModal.find('#web').append('<span>Error (' + xhr.status + ') during deletion of file</span>');
deleteModal.find('#error').html('<span>Error (' + xhr.status + ') during deletion of file</span>');
}
}
};