Localize non components in users pages
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
@inject IUserService UserService
|
||||
@inject IProfileService ProfileService
|
||||
@inject ISettingService SettingService
|
||||
@inject IStringLocalizer<Add> Localizer
|
||||
|
||||
<TabStrip>
|
||||
<TabPanel Name="Identity" ResourceKey="Identity">
|
||||
@ -12,15 +13,15 @@
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">Username: </label>
|
||||
</td>
|
||||
<label class="control-label">@Localizer["Username:"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@username" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">Password: </label>
|
||||
<label class="control-label">@Localizer["Password:"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" class="form-control" @bind="@password" />
|
||||
@ -28,7 +29,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">Confirm Password: </label>
|
||||
<label class="control-label">@Localizer["Confirm Password:"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="password" class="form-control" @bind="@confirm" />
|
||||
@ -36,7 +37,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">Email: </label>
|
||||
<label class="control-label">@Localizer["Email:"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@email" />
|
||||
@ -44,7 +45,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">Full Name: </label>
|
||||
<label class="control-label">@Localizer["Full Name:"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@displayname" />
|
||||
@ -56,42 +57,42 @@
|
||||
<TabPanel Name="Profile" ResourceKey="Profile">
|
||||
@if (profiles != null)
|
||||
{
|
||||
<table class="table table-borderless">
|
||||
@foreach (Profile profile in profiles)
|
||||
{
|
||||
var p = profile;
|
||||
if (p.Category != category)
|
||||
<table class="table table-borderless">
|
||||
@foreach (Profile profile in profiles)
|
||||
{
|
||||
var p = profile;
|
||||
if (p.Category != category)
|
||||
{
|
||||
<tr>
|
||||
<th colspan="2" style="text-align: center;">
|
||||
@p.Category
|
||||
</th>
|
||||
</tr>
|
||||
category = p.Category;
|
||||
}
|
||||
<tr>
|
||||
<th colspan="2" style="text-align: center;">
|
||||
@p.Category
|
||||
</th>
|
||||
<td>
|
||||
<Label For="@p.Name" HelpText="@p.Description">@p.Title</Label>
|
||||
</td>
|
||||
<td>
|
||||
@if (p.IsRequired)
|
||||
{
|
||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
category = p.Category;
|
||||
}
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="@p.Name" HelpText="@p.Description">@p.Title</Label>
|
||||
</td>
|
||||
<td>
|
||||
@if (p.IsRequired)
|
||||
{
|
||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" required @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input id="@p.Name" class="form-control" maxlength="@p.MaxLength" value="@GetProfileValue(p.Name, p.DefaultValue)" @onchange="@(e => ProfileChanged(e, p.Name))" />
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
</table>
|
||||
}
|
||||
</TabPanel>
|
||||
</TabStrip>
|
||||
|
||||
<button type="button" class="btn btn-primary" @onclick="SaveUser">Save</button>
|
||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
||||
<button type="button" class="btn btn-primary" @onclick="SaveUser">@Localizer["Save"]</button>
|
||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
|
||||
|
||||
@code {
|
||||
private string username = string.Empty;
|
||||
@ -185,7 +186,7 @@
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
|
||||
|
||||
private void ProfileChanged(ChangeEventArgs e, string SettingName)
|
||||
{
|
||||
var value = (string)e.Value;
|
||||
|
Reference in New Issue
Block a user