Separate div for form and error of deletion
to preserve form while showing error
This commit is contained in:
parent
5731f67956
commit
c2c6ad0252
126
bindata_gen.go
126
bindata_gen.go
File diff suppressed because one or more lines are too long
|
@ -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>
|
||||
|
|
|
@ -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').html('<span>Error (' + xhr.status + ') during deletion of file</span>');
|
||||
deleteModal.find('#error').html('<span>Error (' + xhr.status + ') during deletion of file</span>');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue