Events webapp
This commit is contained in:
31
StudentHouseDashboard/WebApp/Pages/DeleteEvent.cshtml
Normal file
31
StudentHouseDashboard/WebApp/Pages/DeleteEvent.cshtml
Normal file
@@ -0,0 +1,31 @@
|
||||
@page
|
||||
@using Models;
|
||||
@model WebApp.Pages.DeleteEventModel
|
||||
@{
|
||||
ViewData["Title"] = "Delete event";
|
||||
Event _event = (Event)ViewData["event"];
|
||||
}
|
||||
|
||||
@if (_event == null)
|
||||
{
|
||||
<div class="alert alert-danger" role="alert">
|
||||
Unable to find event! Do you have permission?
|
||||
</div>
|
||||
<a type="button" class="btn btn-primary" asp-page="events">Return to all events</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<form method="post">
|
||||
<h1>Are you sure you want to delete this event?</h1>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">@_event.Title</h5>
|
||||
<h6 class="card-subtitle mb-2 text-body-secondary">@_event.Author.Name - @_event.PublishDate</h6>
|
||||
<p class="card-text">@Html.Raw(_event.Description.Replace(Environment.NewLine, "<br />"))</p>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" asp-for="EventId" value="@_event.ID" />
|
||||
<input type="submit" value="Yes" class="btn btn-danger" />
|
||||
<a type="button" class="btn btn-secondary" asp-page="Events">No</a>
|
||||
</form>
|
||||
}
|
Reference in New Issue
Block a user