fix: careless topic deletion

This commit is contained in:
mrilyew 2025-05-24 22:23:49 +03:00 committed by Alexander Minkin
parent 8f9a303ce9
commit 33f44eb19e
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@
</tr>
<tr>
<td>
<a class="button" href="/topic{$topic->getPrettyId()}/delete?hash={urlencode($csrfToken)}">{_delete_topic}</a>
<a id="_anotherDelete" class="button" href="/topic{$topic->getPrettyId()}/delete?hash={urlencode($csrfToken)}">{_delete_topic}</a>
</td>
<td>
<input type="hidden" name="hash" value="{$csrfToken}" />

View file

@ -606,7 +606,7 @@ function reportClub(club_id) {
]);
}
$(document).on("click", "#_photoDelete, #_videoDelete", function(e) {
$(document).on("click", "#_photoDelete, #_videoDelete, #_anotherDelete", function(e) {
var formHtml = "<form id='tmpPhDelF' action='" + u(this).attr("href") + "' >";
formHtml += "<input type='hidden' name='hash' value='" + u("meta[name=csrf]").attr("value") + "' />";
formHtml += "</form>";