Files
Disco/Disco.Web/Areas/Config/Views/DeviceBatch/Create.cshtml
T
Gary Sharp f2ac35a7fa Bug Fix #75: Display errors creating device batch
Thanks Patrick Connell
2014-09-15 13:24:28 +10:00

39 lines
1.3 KiB
Plaintext

@model Disco.Web.Areas.Config.Models.DeviceBatch.CreateModel
@{
Authorization.Require(Claims.Config.DeviceBatch.Create);
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Device Batches", MVC.Config.DeviceBatch.Index(null), "Create");
}
@using (Html.BeginForm())
{
@Html.ValidationSummary(false)
<div class="form" style="width: 450px">
<table>
<tr>
<th>Name:</th>
<td>
@Html.EditorFor(model => model.DeviceBatch.Name)<br />@Html.ValidationMessageFor(model => model.DeviceBatch.Name)
</td>
</tr>
<tr>
<th>Purchase Date:</th>
<td>
@Html.EditorFor(model => model.DeviceBatch.PurchaseDate)<br />@Html.ValidationMessageFor(model => model.DeviceBatch.PurchaseDate)
</td>
</tr>
</table>
<p class="actions">
<input type="submit" class="button" value="Create" />
</p>
</div>
<script type="text/javascript">
$(function () {
$('#Name').focus().select();
$('#PurchaseDate').datepicker({
changeYear: true,
changeMonth: true,
dateFormat: 'yy/mm/dd'
})
});
</script>
}