techgarage-ir.MTWireGuard/Pages/Components/DeleteModal/DeleteModal.cshtml
2023-03-03 23:24:18 +03:30

31 lines
1.3 KiB
Text

@using MTWireGuard.Models.Requests
@model DeleteRequest
@{
bool IsServer = (bool)ViewData["IsServer"];
}
<div class="modal fade" id="DeleteModal" tabindex="-1" aria-labelledby="DeleteModalLabel" aria-hidden="true">
<div class="modal-dialog">
@{
string FormAction = IsServer ? "Servers/Delete" : "Clients/Delete";
string Type = IsServer ? "server interface" : "client account";
}
<form class="modal-content" action="@FormAction" method="POST">
<div class="modal-header">
<h5 class="modal-title" id="DeleteModalLabel">Are you sure ?</h5>
<button type="button" class="btn-close" data-coreui-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>
Are you sure to delete this @Type ?<br />
This can't be undone!
</p>
<input type="hidden" asp-for="Id" />
</div>
<div class="modal-footer">
<button type="reset" class="btn btn-secondary" data-coreui-dismiss="modal">Close</button>
<button type="submit" class="btn btn-danger">Delete</button>
</div>
@Html.AntiForgeryToken()
</form>
</div>
</div>