diff --git a/php/src/AppBundle/Resources/views/testcases/_testcase-buttons.html.twig b/php/src/AppBundle/Resources/views/testcases/_testcase-buttons.html.twig index 5e7c3b6..9ec6a77 100644 --- a/php/src/AppBundle/Resources/views/testcases/_testcase-buttons.html.twig +++ b/php/src/AppBundle/Resources/views/testcases/_testcase-buttons.html.twig @@ -42,7 +42,15 @@ data-placement="top" title="Not available in demo and guest view mode">Delete {% else %} -
{% endif %} diff --git a/php/src/AppBundle/Resources/views/testcases/index.html.twig b/php/src/AppBundle/Resources/views/testcases/index.html.twig index c5e344a..1217b3c 100644 --- a/php/src/AppBundle/Resources/views/testcases/index.html.twig +++ b/php/src/AppBundle/Resources/views/testcases/index.html.twig @@ -284,7 +284,21 @@ 'loadNewerDataFunction': loadNewerData, 'loadNewestDataFunction': loadNewestData }; + }, + + testcaseDeleteModalSetup: function () { + jQuery('.delete-modal-trigger').on('click', function(e) { + e.preventDefault(); + var testcaseId = jQuery(this).data('testcase-id'); + jQuery('#testcase-delete-modal').data('testcase-id', testcaseId).modal('show'); + }); + + jQuery('#testcase-delete-modal-button-yes').click(function() { + var testcaseId = jQuery('#testcase-delete-modal').data('testcase-id'); + jQuery('#testcase-delete-form-' + testcaseId).submit(); + }); } + }; @@ -330,7 +344,35 @@ +