1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 22:59:28 +00:00

Added delete class button to class page

This commit is contained in:
2022-03-14 09:38:29 +00:00
parent aaec1c0904
commit 8b3f8fa19d
2 changed files with 8 additions and 2 deletions

View File

@@ -1,4 +1,11 @@
<section class='classPage'>
<section class='adminSection adminSection--buttons'>
{{#eq userType 'account'}}
<div class='classes__buttons'>
{{> button style='full' colour='primary' to=deleteLink content='Delete Class' size='lg'}}
</div>
{{/eq}}
</section>
<div class='adminSection'>
<div class='adminItem'>
<h2>Class Overview - {{ className }}</h2>

View File

@@ -18,8 +18,7 @@
const classes = document.querySelectorAll('.classes__class');
classes.forEach(c => {
c.addEventListener('click', () => {
window.location.href =
`/admin/class/${c.getAttribute('data-id')}`;
window.location.href = `/admin/class/${c.getAttribute('data-id')}`;
});
});
</script>