@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())
{ 
    <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>
}
