-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5316 from solgenomics/topic/transformation
Deletion section on transformation project and transformation details page
- Loading branch information
Showing
12 changed files
with
566 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
function deleteTransformationID(transformation_stock_id){ | ||
|
||
const confirmation = confirm('Are you sure you want to delete this transformation ID? The deletion cannot be undone.'); | ||
|
||
if (confirmation) { | ||
jQuery.ajax({ | ||
url: '/ajax/transformation/delete', | ||
data: {'transformation_stock_id' : transformation_stock_id}, | ||
method: 'POST', | ||
destroy: true, | ||
beforeSend: function(response) { | ||
jQuery('#working_modal').modal('show'); | ||
}, | ||
success: function(response) { | ||
jQuery('#working_modal').modal('hide'); | ||
if (response.success == 1) { | ||
alert('Deletion was successful'); | ||
location.reload(); | ||
} | ||
if (response.error) { | ||
alert(response.error); | ||
} | ||
}, | ||
error: function(response) { | ||
jQuery('#working_modal').modal('hide'); | ||
alert('An error occurred during deletion'); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.