2024-03-14 10:25:40 +01:00
|
|
|
@using BTCPayServer.Client
|
|
|
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
2024-02-21 14:43:44 +01:00
|
|
|
@model BTCPayServer.Models.EmailsViewModel
|
2022-06-22 05:05:32 +02:00
|
|
|
@{
|
|
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
|
|
ViewData.SetActivePage(StoreNavPages.Emails, "Emails", Context.GetStoreData().Id);
|
2024-01-26 10:28:50 +01:00
|
|
|
var hasCustomSettings = Model.IsSetup() && !Model.UsesFallback();
|
2022-06-22 05:05:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
<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>
|
2024-03-14 10:25:40 +01:00
|
|
|
<a class="btn btn-secondary" asp-action="StoreEmails" asp-controller="UIStores" asp-route-storeId="@Context.GetStoreData().Id" id="ConfigureEmailRules" permission="@Policies.CanModifyStoreSettings">
|
2022-06-22 05:05:32 +02:00
|
|
|
Configure
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<p>
|
|
|
|
<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>
|
|
|
|
|
2024-01-26 10:28:50 +01:00
|
|
|
<h3 class="mb-4">Email Server</h3>
|
|
|
|
|
2024-02-21 14:43:44 +01:00
|
|
|
<form method="post" autocomplete="off">
|
|
|
|
@if (Model.IsFallbackSetup())
|
|
|
|
{
|
|
|
|
<label class="d-flex align-items-center mb-4">
|
|
|
|
<input type="checkbox" id="UseCustomSMTP" 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="checkout-settings collapse @(hasCustomSettings ? "show" : "")" id="SmtpSettings">
|
|
|
|
<partial name="EmailsBody" model="Model" />
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2024-01-26 10:28:50 +01:00
|
|
|
<partial name="EmailsBody" model="Model" />
|
2024-02-21 14:43:44 +01:00
|
|
|
}
|
2024-03-14 10:25:40 +01:00
|
|
|
|
|
|
|
<partial name="EmailsTest" model="Model" permission="@Policies.CanModifyStoreSettings" />
|
2024-02-21 14:43:44 +01:00
|
|
|
</form>
|
2022-06-22 05:05:32 +02:00
|
|
|
|
|
|
|
@section PageFootContent {
|
|
|
|
<partial name="_ValidationScriptsPartial" />
|
|
|
|
}
|