2024-09-13 13:42:08 +01:00
@using BTCPayServer.Services
@using BTCPayServer.Services.Mails
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model ForgotPasswordViewModel
@inject SettingsRepository SettingsRepository
2017-09-13 15:47:34 +09:00
@{
2024-09-13 13:42:08 +01:00
var isEmailConfigured = (await SettingsRepository.GetSettingAsync<EmailSettings>())?.IsComplete() is true;
ViewData["Title"] = isEmailConfigured ? "Forgot your password?" : "Email Server Configuration Required";
2022-01-21 03:10:03 +01:00
Layout = "_LayoutSignedOut";
2017-09-13 15:47:34 +09:00
}
2024-09-13 13:42:08 +01:00
@if (isEmailConfigured)
{
2024-10-25 15:48:53 +02:00
<p text-translate="true">We all forget passwords sometimes. Just provide email address tied to your account, and we'll start the process of helping you recover your account.</p>
2021-04-08 15:32:42 +02:00
2024-09-13 13:42:08 +01:00
<form asp-action="ForgotPassword" method="post">
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All" class="@(ViewContext.ModelState.ErrorCount.Equals(1) ? "no-marker" : "")"></div>
}
<div class="form-group">
<label asp-for="Email" class="form-label"></label>
<input asp-for="Email" class="form-control" />
<span asp-validation-for="Email" class="text-danger"></span>
</div>
<div class="form-group mt-4">
2024-10-17 15:51:40 +02:00
<button type="submit" class="btn btn-primary btn-lg w-100" text-translate="true">Submit</button>
2024-09-13 13:42:08 +01:00
</div>
</form>
}
else
{
2024-10-17 15:51:40 +02:00
<p text-translate="true">Email password reset functionality is not configured for this server. Please contact the server administrator to assist with account recovery.</p>
2024-09-13 13:42:08 +01:00
<p>
If you are the administrator, please follow these steps to
<a href="https://docs.btcpayserver.org/Notifications/#smtp-email-setup" target="_blank" rel="noreferrer noopener">configure email password resets</a>
or reset your admin password through
<a href="https://docs.btcpayserver.org/FAQ/ServerSettings/#forgot-btcpay-admin-password" target="_blank" rel="noreferrer noopener">command line</a>.
</p>
}
2021-04-08 15:32:42 +02:00
2022-01-21 03:10:03 +01:00
<p class="text-center mt-2 mb-0">
2024-10-17 15:51:40 +02:00
<a id="Login" style="font-size:1.15rem" asp-action="Login" asp-route-returnurl="@ViewData["ReturnUrl"]" text-translate="true">Log in</a>
2022-01-21 03:10:03 +01:00
</p>