mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-10 09:19:24 +01:00
* Onboarding: Invite new users - Separates the user self-registration and invite cases - Adds invitation email for users created by the admin - Adds invitation tokens to verify user was invited - Adds handler action for invite links - Refactors `UserEventHostedService` - Fixes #5726. * Add permissioned form tag helper * Better way of changing a user's role * Test fixes
52 lines
2.2 KiB
Text
52 lines
2.2 KiB
Text
@using BTCPayServer.Client
|
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@model BTCPayServer.Models.EmailsViewModel
|
|
@{
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
ViewData.SetActivePage(StoreNavPages.Emails, "Emails", Context.GetStoreData().Id);
|
|
var hasCustomSettings = (Model.IsSetup() && !Model.UsesFallback()) || ViewBag.UseCustomSMTP ?? false;
|
|
}
|
|
|
|
<div class="row mb-4">
|
|
<div class="col-xl-10 col-xxl-constrain">
|
|
<div class="d-flex flex-wrap gap-3 align-items-center justify-content-between mt-n1 mb-4">
|
|
<h3 class="mb-0">Email Rules</h3>
|
|
<a class="btn btn-secondary" asp-action="StoreEmails" asp-controller="UIStores" asp-route-storeId="@Context.GetStoreData().Id" id="ConfigureEmailRules" permission="@Policies.CanModifyStoreSettings">
|
|
Configure
|
|
</a>
|
|
</div>
|
|
<p class="mb-0">
|
|
<a asp-action="StoreEmails" asp-controller="UIStores" asp-route-storeId="@Context.GetStoreData().Id">Email rules</a>
|
|
allow BTCPay Server to send customized emails from your store based on events.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<h3 class="mt-5 mb-4">Email Server</h3>
|
|
|
|
<form method="post" autocomplete="off" permissioned="@Policies.CanModifyStoreSettings">
|
|
@if (Model.IsFallbackSetup())
|
|
{
|
|
<label class="d-flex align-items-center mb-4">
|
|
<input type="checkbox" id="UseCustomSMTP" name="UseCustomSMTP" value="true" checked="@hasCustomSettings" class="btcpay-toggle me-3" data-bs-toggle="collapse" data-bs-target="#SmtpSettings" aria-expanded="@hasCustomSettings" aria-controls="SmtpSettings" />
|
|
<div>
|
|
<span>Use custom SMTP settings for this store</span>
|
|
<div class="form-text">Otherwise, the server's SMTP settings will be used to send emails.</div>
|
|
</div>
|
|
</label>
|
|
|
|
<div class="collapse @(hasCustomSettings ? "show" : "")" id="SmtpSettings">
|
|
<partial name="EmailsBody" model="Model" />
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<partial name="EmailsBody" model="Model" />
|
|
}
|
|
|
|
<partial name="EmailsTest" model="Model" permission="@Policies.CanModifyStoreSettings" />
|
|
</form>
|
|
|
|
@section PageFootContent {
|
|
<partial name="_ValidationScriptsPartial" />
|
|
}
|