Files

39 lines
1.7 KiB
Plaintext
Raw Permalink Normal View History

@model NewIssueViewModel
@{
ViewData["Title"] = "Nahlásit závadu";
var hadFiles = Model.Files.Count > 0 && !ViewData.ModelState.IsValid;
}
<section class="app-page-head">
<h1>Nahlásit závadu</h1>
<p class="lead text-body-secondary">Popište, co nefunguje a kde. Vedení školy závadu přiřadí řešiteli a o průběhu vás budeme informovat.</p>
</section>
<div class="row">
<div class="col-lg-8">
<div class="app-card">
<partial name="_FormErrors" />
<form method="post" asp-action="New" enctype="multipart/form-data" novalidate>
<partial name="_IssueFields" model="Model" />
<div class="mb-4">
<label asp-for="Files" class="form-label"></label>
<input asp-for="Files" type="file" class="form-control" multiple accept="@AttachmentRules.Accept" aria-describedby="filesHelp" />
<div id="filesHelp" class="form-text">
Nepovinné. Nejvýše @AttachmentRules.MaxFiles souborů po 10 MB – JPG, PNG, HEIC, PDF nebo DOCX.
@if (hadFiles)
{
<strong>Soubory prosím vyberte znovu.</strong>
}
</div>
<span asp-validation-for="Files" class="invalid-feedback d-block"></span>
</div>
<div class="d-flex flex-wrap gap-2">
<button type="submit" class="btn btn-primary">Odeslat hlášení</button>
<a asp-action="Index" class="btn btn-outline-primary">Zrušit</a>
</div>
</form>
</div>
</div>
</div>