FIT5032-Assignment/FIT5032-Assignment/Views/Home/ImageUpload.cshtml

43 lines
1.5 KiB
Plaintext

@model FIT5032_Assignment.Models.ImageUploadForm
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
@using (Html.BeginForm("ImageUpload", "HomeController", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<h4>Upload Image</h4>
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.patientEmail, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.patientEmail, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.patientEmail, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.imageFile, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
<input type="file" name="imageFile" id="imageFile" accept="image/png, image/jpeg" />
@Html.ValidationMessageFor(model => model.imageFile, "", new { @class = "text-danger" })
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}