48 lines
2.4 KiB
Plaintext
48 lines
2.4 KiB
Plaintext
@inject HttpClient Client
|
|
@inject IDialogService DialogService
|
|
@inject LoginService LoginService
|
|
@inject NavigationManager NavigationManager
|
|
|
|
@page "/Cards/ChangePassword"
|
|
|
|
<h1>Cards</h1>
|
|
|
|
@if (LoginService.OnlyAdmin || !LoginService.LoginRequired)
|
|
{
|
|
<h1>Changing password is turned off</h1>
|
|
}
|
|
else
|
|
{
|
|
<MudContainer>
|
|
<MudGrid Justify="Justify.Center">
|
|
<MudItem xs="4" class="mt-8">
|
|
<MudCard>
|
|
<MudCardContent>
|
|
<MudForm @ref="changePasswordForm">
|
|
<MudText Typo="Typo.h4" Align="Align.Center">Change Password</MudText>
|
|
<MudTextField @bind-value="cardNum" InputType="InputType.Text" T="string"
|
|
FullWidth="true" Required="@true" RequiredError="Card Number is required"
|
|
Label="Card Number"/>
|
|
<MudTextField @bind-Value="oldPassword" InputType="InputType.Password"
|
|
T="string" FullWidth="true" Required="@true"
|
|
RequiredError="Old Password is required"
|
|
Label="Old Password">
|
|
</MudTextField>
|
|
<MudTextField @bind-Value="newPassword" InputType="InputType.Password"
|
|
T="string" FullWidth="true" Required="@true"
|
|
RequiredError="Password is required"
|
|
Label="New Password">
|
|
</MudTextField>
|
|
<MudTextField @bind-Value="confirmNewPassword" InputType="InputType.Password"
|
|
T="string" FullWidth="true" Required="@true"
|
|
RequiredError="Confirm password is required"
|
|
Label="Confirm New Password">
|
|
</MudTextField>
|
|
<MudButton OnClick="OnChangePassword" FullWidth="true" Class="mt-3" StartIcon="@Icons.Filled.Edit" Color="Color.Primary" Variant="Variant.Filled">Change password</MudButton>
|
|
</MudForm>
|
|
</MudCardContent>
|
|
</MudCard>
|
|
</MudItem>
|
|
</MudGrid>
|
|
</MudContainer>
|
|
} |