@page
@using Microsoft.Extensions.Localization
@using Volo.Abp.Identity.Web.Localization.Resources.AbpIdentity
@model Volo.Abp.Identity.Web.Pages.Identity.Users.EditModalModel
@inject IStringLocalizer<IdentityResource> L
@{
    Layout = null;
}

<form method="post" asp-page="/Identity/Users/EditModal">
    
    <abp-modal>

        <abp-modal-header title="@L["Edit"]"></abp-modal-header>

        <abp-modal-body>

            <ul class="nav nav-tabs" role="tablist">
                <li class="nav-item">
                    <a class="nav-link active" data-toggle="tab" href="#EditUser_UserInfoTab" role="tab">@L["UserInformations"]</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-toggle="tab" href="#EditUser_RolesTab" role="tab">@L["Roles"]</a>
                </li>
            </ul>

            <div class="tab-content pt-3">

                <div class="tab-pane active" id="EditUser_UserInfoTab" role="tabpanel">

                    <input asp-for="UserInfo.Id" />

                    <div class="form-group">
                        <label asp-for="UserInfo.UserName"></label>
                        <input asp-for="UserInfo.UserName" class="form-control" />
                        <span asp-validation-for="UserInfo.UserName" class="text-danger"></span>
                    </div>
                    <div class="form-group">
                        <label asp-for="UserInfo.Email"></label>
                        <input asp-for="UserInfo.Email" class="form-control" />
                        <span asp-validation-for="UserInfo.Email" class="text-danger"></span>
                    </div>
                    <div class="form-group">
                        <label asp-for="UserInfo.PhoneNumber"></label>
                        <input asp-for="UserInfo.PhoneNumber" class="form-control" />
                        <span asp-validation-for="UserInfo.PhoneNumber" class="text-danger"></span>
                    </div>
                    <div class="form-check">
                        <label asp-for="@Model.UserInfo.LockoutEnabled" class="form-check-label">
                            <input asp-for="@Model.UserInfo.LockoutEnabled" class="form-check-input" />
                            @Html.DisplayNameFor(m => m.UserInfo.LockoutEnabled)
                        </label>
                    </div>
                    <div class="form-check">
                        <label asp-for="@Model.UserInfo.TwoFactorEnabled" class="form-check-label">
                            <input asp-for="@Model.UserInfo.TwoFactorEnabled" class="form-check-input" />
                            @Html.DisplayNameFor(m => m.UserInfo.TwoFactorEnabled)
                        </label>
                    </div>

                </div>
                <div class="tab-pane" id="EditUser_RolesTab" role="tabpanel">
                    @for (var i = 0; i < Model.Roles.Length; i++)
                    {
                        <div class="form-check">
                            <label asp-for="@Model.Roles[i].IsAssigned" class="form-check-label">
                                <input asp-for="@Model.Roles[i].IsAssigned" class="form-check-input" />
                                @Model.Roles[i].Name
                            </label>
                        </div>
                        <input asp-for="@Model.Roles[i].Name" />
                    }
                </div>

            </div>

            <div asp-validation-summary="All" class="text-danger"></div>

        </abp-modal-body>

        <abp-modal-footer></abp-modal-footer>

    </abp-modal>

</form>