mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 22:59:28 +00:00
Generalise test onclick handler
This commit is contained in:
@@ -4,3 +4,10 @@
|
||||
<td>{{ subject }}</td>
|
||||
<td>{{ date }}</td>
|
||||
</tr>
|
||||
|
||||
<script>
|
||||
document.querySelector('.tests tbody tr[data-id="{{id}}"]').addEventListener('click', (e) => {
|
||||
const test = e.path[1];
|
||||
window.location.href = `/admin/test/${test.getAttribute('data-id')}`;
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user