School Commit Init
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
@model Lab9.Models.News
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>
|
||||
Edit
|
||||
</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="addFormDiv">
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="container text-left">
|
||||
<form method="post" action="/edit" id="addForm">
|
||||
<h3>Edit a news:</h3>
|
||||
<div class="mb-1">
|
||||
<input type="hidden" id="idField" value="@Model.Id" name="Id" />
|
||||
<label for="titleField" class="form-label">Title: </label><input type="text"
|
||||
id="titleField"
|
||||
class="form-control"
|
||||
required
|
||||
name="Title"
|
||||
pattern="[0-9A-Za-z-.\:;]{5,30}"
|
||||
value="@Model.Title" />
|
||||
</div>
|
||||
<div class="mb-1">
|
||||
<label for="contentField" class="form-label">Content: </label><input type="text"
|
||||
id="contentField"
|
||||
class="form-control"
|
||||
required
|
||||
name="NewsText"
|
||||
pattern="[0-9A-Za-z-.\:;]{10,256}"
|
||||
value="@Model.NewsText" />
|
||||
</div>
|
||||
<div class="mb-1">
|
||||
<label for="dateField" class="form-label">Date: </label><input type="date"
|
||||
id="dateField"
|
||||
class="form-control"
|
||||
required
|
||||
name="Date"
|
||||
value="@Model.Date.ToString("yyyy-MM-dd")" />
|
||||
</div>
|
||||
<div class="mb-1">
|
||||
<label for="producerField" class="form-label">Producer: </label><input type="text"
|
||||
id="producerField"
|
||||
class="form-control"
|
||||
required
|
||||
name="Producer"
|
||||
pattern="[0-9A-Za-z-]{5,30}"
|
||||
value="@Model.Producer" />
|
||||
</div>
|
||||
<div class="mb-1">
|
||||
<label for="categoryField" class="form-label">Category: </label><input type="text"
|
||||
id="categoryField"
|
||||
class="form-control"
|
||||
required
|
||||
name="Category"
|
||||
pattern="[0-9A-Za-z-]{5,30}"
|
||||
value="@Model.Category" />
|
||||
</div>
|
||||
|
||||
<button id="insertNewsButton"
|
||||
type="submit"
|
||||
class="btn btn-success mb-1">
|
||||
Edit News
|
||||
</button>
|
||||
</form>
|
||||
<a
|
||||
class="btn btn-secondary mb-1"
|
||||
name="returnButton"
|
||||
href="/admin">
|
||||
Return to admin
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user