-
Notifications
You must be signed in to change notification settings - Fork 162
/
SyncUsers.cshtml
60 lines (53 loc) · 2.31 KB
/
SyncUsers.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@page
@using global::AuthPermissions.AdminCode
@using LocalizeMessagesAndErrors
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model Example1.RazorPages.IndividualAccounts.Pages.AuthUsers.SyncUsersModel
@inject ISimpleLocalizer SimpleLocalizer
@if (!@Model.Data.Any())
{
<h3>
@SimpleLocalizer.LocalizeString("There are no changes to apply to the AuthUsers", this)
</h3>
return;
}
<h3>
@SimpleLocalizer.LocalizeString("Changes needed based on authentication provider's users", this)
</h3>
<form method="post">
<table class="table">
<thead>
<tr>
<th>@SimpleLocalizer.LocalizeString("Change type", this)</th>
<th>@SimpleLocalizer.LocalizeString("Email", this)</th>
<th>@SimpleLocalizer.LocalizeString("UserName", this)</th>
<th>@SimpleLocalizer.LocalizeString("Roles count", this)</th>
</tr>
</thead>
<tbody>
@for (int i = 0; i < Model.Data.Count; i++)
{
<tr>
<td>
@SimpleLocalizer.LocalizeString(Model.Data[i].FoundChangeType.ToString(), this)
@Html.Hidden($"Data[{i}].{nameof(SyncAuthUserWithChange.UserId)}", Model.Data[i].UserId)
@Html.Hidden($"Data[{i}].{nameof(SyncAuthUserWithChange.FoundChangeType)}", Model.Data[i].FoundChangeType)
</td>
<td @(Model.Data[i].EmailChanged ? "class=bg-warning text-dark" : "")>
@Model.Data[i].Email
@Html.Hidden($"Data[{i}].{nameof(SyncAuthUserWithChange.Email)}", Model.Data[i].Email)
</td>
<td @(Model.Data[i].UserNameChanged ? "class=bg-warning text-dark" : "")>
@Model.Data[i].UserName
@Html.Hidden($"Data[{i}].{nameof(SyncAuthUserWithChange.UserName)}", Model.Data[i].UserName)
</td>
<td>@Model.Data[i].NumRoles</td>
</tr>
}
</tbody>
</table>
<button class="btn btn-primary">@SimpleLocalizer.LocalizeString("Apply sync change", this)</button>
<a class="btn btn-secondary" asp-area="" asp-page=".\ListUsers">
@SimpleLocalizer.LocalizeString("Cancel", this)
</a>
</form>