1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 16:19:26 +00:00

Changed class view ready for delete functionality

This commit is contained in:
2022-04-21 13:09:23 +00:00
parent ef13568221
commit dc51258901

View File

@@ -2,7 +2,9 @@
<section class='adminSection adminSection--buttons'>
{{#eq userType 'account'}}
<div class='classes__buttons'>
{{> button style='full' colour='primary' to=deleteLink content='Delete Class' size='lg'}}
<form action='{{deleteLink}}' method='post' class='deleteForm'>
<input type='submit' class='btn btn--full btn--primary btn--lg' value='Delete'/>
</form>
</div>
{{/eq}}
</section>
@@ -63,3 +65,10 @@
</div>
</div>
</section>
<script>
document.querySelector('.deleteForm').addEventListener('submit', (e) => {
if (!confirm('Delete class?'))
e.preventDefault();
});
</script>