@model GreenTree.Strohrmann.ERP.Web.Models.Rights.User.UserModel

@{
    ViewData["Title"] = "Edit";
}

<h1>Bearbeiten</h1>

<h4>@Model.Lastname, @Model.Forename</h4>
<hr />
<div class="row">
    <div class="col-md-4">
        <form asp-action="Edit">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            <input asp-for="Id" type="hidden" class="form-control" />
            <div class="form-group">
                <label asp-for="Accountname" class="control-label"></label>
                <input asp-for="Accountname" class="form-control" />
                <span asp-validation-for="Accountname" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Forename" class="control-label"></label>
                <input asp-for="Forename" class="form-control" />
                <span asp-validation-for="Forename" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Lastname" class="control-label"></label>
                <input asp-for="Lastname" class="form-control" />
                <span asp-validation-for="Lastname" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Birthdate" class="control-label"></label>
                <input asp-for="Birthdate" type="date" class="form-control" />
                <span asp-validation-for="Birthdate" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Activated" class="control-label">Aktiviert</label>
                <select asp-for="Activated" class="form-control">
                    <option value="true">Ja</option>
                    <option value="false">Nein</option>
                </select>
            </div>
            <div class="form-group">
                <label asp-for="Policies" class="control-label">Rechte</label>
                @Html.TokenBoxFor(model => model.Policies, availableValues: (string[])ViewData["AvailablePolicies"], allowOnlyOnce: true)
                <span asp-validation-for="Policies" class="text-danger"></span>
            </div>
            <div class="form-group">
                <input type="submit" value="Speichern" class="btn btn-primary" />
            </div>
        </form>
    </div>
</div>

<div>
    <a asp-action="Index">Zurück zur Liste</a>
</div>

@section Scripts {
    @{
		await Html.RenderPartialAsync("_ValidationScriptsPartial");
		await Html.RenderPartialAsync("_TokenBoxLibPartial");
	}
}