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
|
|
|
@{
|
2024-06-19 15:23:10 +02:00
|
|
|
var storeId = Context.GetStoreData().Id;
|
2024-03-19 14:58:33 +01:00
|
|
|
var hasCustomSettings = (Model.IsSetup() && !Model.UsesFallback()) || ViewBag.UseCustomSMTP ?? false;
|
2024-06-19 15:23:10 +02:00
|
|
|
ViewData.SetActivePage(StoreNavPages.Emails, "Email Rules", storeId);
|
2022-06-22 05:05:32 +02:00
|
|
|
}
|
|
|
|
|
2024-03-19 14:58:33 +01:00
|
|
|
<form method="post" autocomplete="off" permissioned="@Policies.CanModifyStoreSettings">
|
2024-06-19 15:23:10 +02:00
|
|
|
<div class="sticky-header">
|
|
|
|
<h2>Email Server</h2>
|
2024-07-25 15:23:28 +09:00
|
|
|
<button id="page-primary" type="submit" class="btn btn-primary" name="command" value="Save">Save</button>
|
2024-06-19 15:23:10 +02:00
|
|
|
</div>
|
|
|
|
<partial name="_StatusMessage" />
|
2024-02-21 14:43:44 +01:00
|
|
|
@if (Model.IsFallbackSetup())
|
|
|
|
{
|
|
|
|
<label class="d-flex align-items-center mb-4">
|
2024-03-19 14:58:33 +01:00
|
|
|
<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" />
|
2024-02-21 14:43:44 +01:00
|
|
|
<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>
|
|
|
|
|
2024-03-19 14:58:33 +01:00
|
|
|
<div class="collapse @(hasCustomSettings ? "show" : "")" id="SmtpSettings">
|
2024-02-21 14:43:44 +01:00
|
|
|
<partial name="EmailsBody" model="Model" />
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2024-07-09 15:51:16 +02:00
|
|
|
<input type="hidden" name="UseCustomSMTP" value="true" />
|
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
|
|
|
|
2024-06-19 15:23:10 +02:00
|
|
|
<div class="mt-5" permission="@Policies.CanModifyStoreSettings">
|
|
|
|
<h3>Email Rules</h3>
|
|
|
|
<p>Email rules allow BTCPay Server to send customized emails from your store based on events.</p>
|
|
|
|
<a class="btn btn-secondary" asp-action="StoreEmails" asp-controller="UIStores" asp-route-storeId="@storeId" id="ConfigureEmailRules" permission="@Policies.CanModifyStoreSettings">
|
|
|
|
Configure
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
2022-06-22 05:05:32 +02:00
|
|
|
@section PageFootContent {
|
|
|
|
<partial name="_ValidationScriptsPartial" />
|
|
|
|
}
|