5 <& /util/import_javascript.mas, classes => [ 'jquery', 'jquery.dataTables' ] &>
6 <& /util/import_css.mas, paths => ['/documents/inc/datatables/jquery.dataTables.css'] &>
8 <&| /page/info_section.mas, id=>'delete_transformation_ids_section', title => 'Delete Transformation IDs', subtitle => '<font color="red">Deletion cannot be undone</font>', collapsible=>1, collapsed=>1 &>
9 <div class="well well-sm">
10 <div class="panel panel-default">
11 <div class="panel-body">
12 <table class="table table-hover table-bordered" id="transformation_ids_deletion_table">
16 <button class="btn btn-default" id="delete_all_transformation_ids" role="button">Delete all transformation ids in this project</button><br/><br/>
20 <&| /page/info_section.mas, id=>'delete_transformation_project_section', title => 'Delete Transformation Project', subtitle => '<font color="red">Deletion cannot be undone. Please delete transformation ids in this project first</font>', collapsible=>1, collapsed=>1 &>
21 <div class="well well-sm">
22 <div class="panel panel-default">
23 <div class="panel-body">
24 <button class="btn btn-default" id="delete_transformation_project" role="button">Delete transformation project</button><br/><br/>
33 jQuery(document).ready(function(){
36 jQuery('#delete_transformation_project').click(function() {
37 var trial_id = "<% $trial_id %>";
38 var confirmation = confirm("Are you sure you want to delete this transformation project? The deletion cannot be undone.");
41 url: '/ajax/breeders/trial/'+trial_id+'/delete/transformation_project',
42 beforeSend: function(){
43 jQuery('#working_modal').modal("show");
45 success: function(response) {
46 jQuery('#working_modal').modal('hide');
47 if (response.success == 1) {
48 alert('Deletion was successful');
52 alert(response.error);
55 error: function(response) {
56 jQuery('#working_modal').modal('hide');
57 alert('An error occurred during deletion');