diff --git a/templates/suppressions.html b/templates/suppressions.html index 62fe3ed..f4f4635 100644 --- a/templates/suppressions.html +++ b/templates/suppressions.html @@ -51,11 +51,11 @@
- - - - - + + + + +
Persists until manually removed.
@@ -96,7 +96,7 @@ {{ s.created_at }} {% if s.expires_at %}{{ s.expires_at }}{% else %}manual{% endif %} - + {% endfor %} @@ -228,10 +228,14 @@ } document.addEventListener('click', e => { - const pill = e.target.closest('.pill[data-dur]'); - if (!pill) return; - const val = pill.dataset.dur; - setDur(val ? parseInt(val) : null, pill); + const pill = e.target.closest('#create-suppression-form .pill[data-duration]'); + if (pill) { + const val = pill.dataset.duration; + setDur(val ? parseInt(val) : null, pill); + return; + } + const removeBtn = e.target.closest('[data-action="remove-sup"]'); + if (removeBtn) removeSuppression(parseInt(removeBtn.dataset.supId)); }); {% endblock %}