Fix missing CSRF tokens in all delete forms

- Added @Html.AntiForgeryToken() to Products delete form
- Added @Html.AntiForgeryToken() to Categories delete form
- Added @Html.AntiForgeryToken() to Users delete form
- Added @Html.AntiForgeryToken() to ShippingRates delete form
- Added @Html.AntiForgeryToken() to Product Variations delete form

This fixes the 400 Bad Request errors when trying to delete items
This commit is contained in:
2025-09-24 18:02:17 +01:00
parent 96125d6042
commit bc708bb0a3
6 changed files with 11 additions and 4 deletions

View File

@@ -62,8 +62,9 @@
<a href="@Url.Action("Edit", new { id = rate.Id })" class="btn btn-outline-primary">
<i class="fas fa-edit"></i>
</a>
<form method="post" action="@Url.Action("Delete", new { id = rate.Id })" class="d-inline"
<form method="post" action="@Url.Action("Delete", new { id = rate.Id })" class="d-inline"
onsubmit="return confirm('Are you sure you want to delete this shipping rate?')">
@Html.AntiForgeryToken()
<button type="submit" class="btn btn-outline-danger">
<i class="fas fa-trash"></i>
</button>