diff --git a/views/partials/testResult.hbs b/views/partials/testResult.hbs index 81971bb..917043c 100644 --- a/views/partials/testResult.hbs +++ b/views/partials/testResult.hbs @@ -33,10 +33,15 @@
{{>button style='full' colour='primary' addClasses='resultEdit' content='Edit result'}} -
- - -
+
{{/if}} @@ -56,8 +61,13 @@ form.style.display = (form.style.display === 'none') - ? 'grid' + ? 'block' : 'none'; }); + + document.querySelector('.testPage__testResultWrapper[data-id="{{result.id}}"] .form form:nth-child(2)').addEventListener('submit', (e) => { + if (!confirm('Delete test result?')) + e.preventDefault(); + }); {{/if}}