1
0
This repository has been archived on 2026-04-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
my-old-website/MyWebsite/MyWebsite/Areas/Admin/Views/Badges/Create.cshtml
T
Michael Gordeev 17bdf1ea77 Updated site
2020-03-12 22:01:12 +03:00

47 lines
1.5 KiB
Plaintext

@model MyWebsite.Models.BadgeModel
@{
ViewData["Title"] = "Create badge";
}
<header>
&#xE760; <a asp-action="Index">Back to the list</a>
<h1>Create project badge</h1>
</header>
<article>
<form asp-action="Create" oninput="UpdatePreview();">
<div asp-validation-summary="All" class="text-danger"></div>
<div>
<label asp-for="Name"></label>
<input asp-for="Name" type="text" placeholder="Enter unique badge name" required />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div>
<label asp-for="EnglishDescription"></label>
<input asp-for="EnglishDescription" type="text" required />
<span asp-validation-for="EnglishDescription" class="text-danger"></span>
</div>
<div>
<label asp-for="RussianDescription"></label>
<input asp-for="RussianDescription" type="text" />
<span asp-validation-for="RussianDescription" class="text-danger"></span>
</div>
<div>
<label asp-for="Image"></label>
<div class="image-selector">
<select asp-for="Image" onchange="UpdatePreview();" required>
@foreach (string path in System.IO.Directory.GetFiles(System.IO.Directory.GetCurrentDirectory() + "/wwwroot/images/Badges"))
{
string file = System.IO.Path.GetFileNameWithoutExtension(path);
<option value="@file">@file</option>
}
</select>
<span>.png</span>
</div>
<span asp-validation-for="Image" class="text-danger"></span>
</div>
<partial name="Preview.cshtml" />
<input type="submit" value="Create" />
</form>
</article>