File size: 1,578 Bytes
fc06b79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@model ContactManagementAPI.Models.Contact
@{
    ViewData["Title"] = $"Delete Contact - {Model.FirstName} {Model.LastName}";
}

<div class="delete-container">
    <div class="delete-header">
        <h2><i class="fas fa-exclamation-triangle"></i> Confirm Delete</h2>
    </div>

    <div class="delete-message">
        <p>Are you sure you want to delete this contact?</p>
        <div class="contact-preview">
            @if (!string.IsNullOrEmpty(Model.PhotoPath))
            {
                <img src="@Model.PhotoPath" alt="@Model.FirstName @Model.LastName" />
            }
            else
            {
                <div class="photo-placeholder-large">
                    <i class="fas fa-user"></i>
                </div>
            }
            <h3>@Model.FirstName @Model.LastName</h3>
            @if (!string.IsNullOrEmpty(Model.Email))
            {
                <p>@Model.Email</p>
            }
        </div>
        <p class="warning-text">This action cannot be undone. All associated photos and documents will also be deleted.</p>
    </div>

    <form asp-action="DeleteConfirmed" method="post" class="delete-form">
        @Html.AntiForgeryToken()
        <input type="hidden" asp-for="Id" />
        <div class="form-actions">
            <button type="submit" class="btn btn-danger">
                <i class="fas fa-trash"></i> Delete Contact
            </button>
            <a href="/home/details/@Model.Id" class="btn btn-secondary">
                <i class="fas fa-times"></i> Cancel
            </a>
        </div>
    </form>
</div>