-
-
Notifications
You must be signed in to change notification settings - Fork 750
Expand file tree
/
Copy pathSecurity.razor
More file actions
28 lines (28 loc) · 2.05 KB
/
Security.razor
File metadata and controls
28 lines (28 loc) · 2.05 KB
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
@inject Microsoft.Extensions.Localization.IStringLocalizer<Security> _localizer
@page "/change-password/"
<EditForm Model="@_passwordModel" OnValidSubmit="ChangePasswordAsync">
<FluentValidationValidator @ref="_fluentValidationValidator" />
<MudCard Elevation="25">
<MudCardHeader>
<CardHeaderContent>
<MudText>@_localizer["Change Password"]</MudText>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudGrid>
<MudItem xs="12" md="6">
<MudTextField T="string" @bind-Value="_passwordModel.NewPassword" For="@(() => _passwordModel.NewPassword)" Label="@_localizer["Password"]" Variant="Variant.Outlined" InputType="_newPasswordInput" Adornment="Adornment.End" AdornmentIcon="@_newPasswordInputIcon" OnAdornmentClick="@(() => TogglePasswordVisibility(true))" />
</MudItem>
<MudItem xs="12" md="6">
<MudTextField T="string" @bind-Value="_passwordModel.ConfirmNewPassword" For="@(() => _passwordModel.ConfirmNewPassword)" Label="@_localizer["Password Confirmation"]" Variant="Variant.Outlined" InputType="_newPasswordInput" Adornment="Adornment.End" AdornmentIcon="@_newPasswordInputIcon" OnAdornmentClick="@(() => TogglePasswordVisibility(true))" />
</MudItem>
<MudItem xs="12">
<MudTextField T="string" @bind-Value="_passwordModel.Password" For="@(() => _passwordModel.Password)" Label="@_localizer["Current Password"]" Variant="Variant.Outlined" InputType="_currentPasswordInput" Adornment="Adornment.End" AdornmentIcon="@_currentPasswordInputIcon" OnAdornmentClick="@(() => TogglePasswordVisibility(false))" />
</MudItem>
</MudGrid>
</MudCardContent>
<MudCardActions Class="pb-4 pl-4">
<MudButton Variant="Variant.Filled" Disabled="@(!Validated)" Color="Color.Primary" ButtonType="ButtonType.Submit" Class="ml-auto">@_localizer["Change Password"]</MudButton>
</MudCardActions>
</MudCard>
</EditForm>