mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
50 lines
2.1 KiB
Plaintext
50 lines
2.1 KiB
Plaintext
@using BTCPayServer.Client
|
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@model BTCPayServer.Models.EmailsViewModel
|
|
@{
|
|
var storeId = Context.GetStoreData().Id;
|
|
var hasCustomSettings = (Model.IsSetup() && !Model.UsesFallback()) || ViewBag.UseCustomSMTP ?? false;
|
|
ViewData.SetActivePage(StoreNavPages.Emails, "Email Rules", storeId);
|
|
}
|
|
|
|
<form method="post" autocomplete="off" permissioned="@Policies.CanModifyStoreSettings">
|
|
<div class="sticky-header">
|
|
<h2>Email Server</h2>
|
|
<button id="page-primary" type="submit" class="btn btn-primary" name="command" value="Save">Save</button>
|
|
</div>
|
|
<partial name="_StatusMessage" />
|
|
@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
|
|
{
|
|
<input type="hidden" name="UseCustomSMTP" value="true" />
|
|
<partial name="EmailsBody" model="Model" />
|
|
}
|
|
|
|
<partial name="EmailsTest" model="Model" permission="@Policies.CanModifyStoreSettings" />
|
|
</form>
|
|
|
|
<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>
|
|
|
|
@section PageFootContent {
|
|
<partial name="_ValidationScriptsPartial" />
|
|
}
|