94 lines
3.7 KiB
Plaintext
94 lines
3.7 KiB
Plaintext
@page "/forgotpassword"
|
|
@inherits BasePageComponent
|
|
@using AyCode.Core.Consts
|
|
@using AyCode.Core.Helpers
|
|
@using TIAM.Models.Dtos.Users
|
|
@using TIAMSharedUI.Shared.Components.BaseComponents
|
|
@using BlazorAnimation
|
|
@using TIAMWebApp.Shared.Application.Interfaces
|
|
@using TIAMWebApp.Shared.Application.Models.PageModels;
|
|
@using TIAMSharedUI.Pages.Components;
|
|
@using TIAMSharedUI.Pages.User.CardComponents
|
|
@using TIAMWebApp.Shared.Application.Services
|
|
@inject AdminSignalRClient AdminSignalRClient
|
|
@inject IUserDataService UserDataService
|
|
|
|
<PageTitle>Forgot password</PageTitle>
|
|
|
|
<div class="text-center m-5">
|
|
<h1>Renew password</h1>
|
|
<h2 style="font-size:small">Good to see you again!</h2>
|
|
</div>
|
|
|
|
|
|
<div class="container mt-3">
|
|
<div class="row d-flex justify-content-center align-items-center h-100">
|
|
<div class="col-12 col-sm-6 px-5">
|
|
<Animation Effect="@Effect.FadeIn" Speed="@Speed.Slow" Delay="@TimeSpan.FromMilliseconds(250)">
|
|
<div class="card glass inputwizardwrapper my-5">
|
|
|
|
<div class="wrapper">
|
|
<div class="my-logo">
|
|
<img src="_content/TIAMSharedUI/images/png-logo-0.png" alt="">
|
|
</div>
|
|
<div class="text-center mt-4 name">
|
|
@_localizer["LoginTitleText"]
|
|
</div>
|
|
<div class="form-field">
|
|
<DxMaskedInput @bind-Value="@emailAddress"
|
|
Id="Email"
|
|
CssClass="form-control"
|
|
Mask="@EmailMask"
|
|
MaskMode="MaskMode.RegEx">
|
|
<DxRegExMaskProperties MaskAutoCompleteMode="@((MaskAutoCompleteMode)AutoCompleteMode)"
|
|
Placeholder="Placeholder"
|
|
PlaceholdersVisible="PlaceholderVisible" />
|
|
</DxMaskedInput>
|
|
</div>
|
|
<DxButton CssClass="btn btn-primary mt-3" Click="() => SendMail(emailAddress)">Send</DxButton>
|
|
<div class="text-center fs-6">
|
|
No account yet? <a href="register">Sign up here!</a>
|
|
</div>
|
|
<div class="text-center fs-6">
|
|
Figured it out? <a href="login">Back to login!</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Animation>
|
|
</div>
|
|
<div class="col-12 col-sm-6 px-5">
|
|
<Animation Effect="@Effect.FadeIn" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
|
|
<p>
|
|
@msg;
|
|
|
|
|
|
</p>
|
|
</Animation>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@code {
|
|
|
|
private string emailAddress { get; set; }
|
|
string EmailMask { get; set; } = AcRegExpression.EmailMask;
|
|
MaskAutoCompleteMode AutoCompleteMode { get; set; } = MaskAutoCompleteMode.Strong;
|
|
char Placeholder { get; set; } = '_';
|
|
bool PlaceholderVisible { get; set; } = false;
|
|
|
|
private bool sendResult = false;
|
|
private string msg = "Welcome back to TourIam! We're delighted to have you return to our platform. Let's figure out your password issue! Please fill in the email address you have used for registration.";
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
|
|
await base.OnInitializedAsync();
|
|
}
|
|
|
|
private void SendMail(string email)
|
|
{
|
|
var sendResult = UserDataService.SendForgottenPasswordMail(emailAddress).Forget;
|
|
msg = "We have sent you an email, with instructions on how to renew your password. ";
|
|
}
|
|
}
|