mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 20:59:30 +00:00
Changed test view ready for delete functionality
This commit is contained in:
@@ -2,7 +2,9 @@
|
|||||||
<section class='adminSection adminSection--buttons'>
|
<section class='adminSection adminSection--buttons'>
|
||||||
{{#eq userType 'account'}}
|
{{#eq userType 'account'}}
|
||||||
<div class='classes__buttons'>
|
<div class='classes__buttons'>
|
||||||
{{> button style='full' colour='primary' to=deleteLink content='Delete Test' size='lg'}}
|
<form action='{{deleteLink}}' method='post' class='deleteForm'>
|
||||||
|
<input type='submit' class='btn btn--full btn--primary btn--lg' value='Delete'/>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{/eq}}
|
{{/eq}}
|
||||||
</section>
|
</section>
|
||||||
@@ -69,3 +71,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.querySelector('.deleteForm').addEventListener('submit', (e) => {
|
||||||
|
if (!confirm('Delete test?'))
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user