Skip to content

Commit

Permalink
Fix solo cert delete button not working sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
Celeo committed Feb 21, 2025
1 parent a1584cc commit 5cc7088
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions static/controller_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ document
.getElementById("btn-unlink-discord")
?.addEventListener("click", (e) => {
e.preventDefault();
const cid = e.target.getAttribute("controller-cid");
const cid = e.target.closest("button").getAttribute("controller-cid");
const result = window.confirm(
"Are you sure you want to unlink this controller's Discord account?"
);
Expand Down Expand Up @@ -89,7 +89,7 @@ document
document.querySelectorAll(".btn-delete-comment").forEach((button) => {
button.addEventListener("click", (e) => {
e.preventDefault();
const cid = e.target.getAttribute("controller-cid");
const cid = e.target.closest("button").getAttribute("controller-cid");
const noteId = button.getAttribute("note-id");
const result = window.confirm(
"Are you sure you want to delete your comment?"
Expand All @@ -112,7 +112,7 @@ document.querySelectorAll(".btn-delete-comment").forEach((button) => {
document.querySelectorAll(".button-delete-solo-cert").forEach((button) => {
button.addEventListener("click", (e) => {
e.preventDefault();
const cid = e.target.getAttribute("controller-cid");
const cid = e.target.closest("button").getAttribute("controller-cid");
const soloCertId = button.getAttribute("solo-cert-id");
const result = window.confirm(
"Are you sure you want to delete this solo cert?"
Expand Down
11 changes: 11 additions & 0 deletions vzdv-site/templates/changelog.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@

<hr>

<div class="card shadow mb-3">
<div class="card-body">
<h5 class="card-title">2025-02-12</h5>
<div class="card-text">
<ul>
<li>Fix some issues with button clicks not doing what they're supposed to</li>
</ul>
</div>
</div>
</div>

<div class="card shadow mb-3">
<div class="card-body">
<h5 class="card-title">2025-02-16</h5>
Expand Down

0 comments on commit 5cc7088

Please sign in to comment.