mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
64a7abe53a
* Remove xxl breakpoint * Remove code bg * Form updates * Update PoS accordion * Update forms * Fix webhook password toggle * Update highlight js styles * Page updates * Style unformatted checkboxes * Fix typo * Update accordions * Update policies domain mapping * Update toggles and checkboxes * Update storage pages * Fix specter logo filename casing * Update checkout experience view * Update webhook view * Re-add used negative margins * Update bootstrap * POS layout fixes * Decrease size of info icon in main headline * Update BTCPayServer/Views/Stores/ModifyWebhook.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
128 lines
6.3 KiB
Plaintext
128 lines
6.3 KiB
Plaintext
@model BTCPayServer.Models.ServerViewModels.EmailsViewModel
|
|
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<div class="d-flex align-items-center justify-content-between mb-4">
|
|
<h2 class="mb-0">@ViewData["Title"]</h2>
|
|
<div class="dropdown only-for-js" id="quick-fill">
|
|
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="QuickFillDropdownToggle">
|
|
Quick fill settings for...
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="QuickFillDropdownToggle">
|
|
<a class="dropdown-item" href="" data-server="smtp.gmail.com" data-port="587" data-enablessl="true">Gmail.com</a>
|
|
<a class="dropdown-item" href="" data-server="mail.yahoo.com" data-port="587" data-enablessl="true">Yahoo.com</a>
|
|
<a class="dropdown-item" href="" data-server="smtp.mailgun.org" data-port="587" data-enablessl="true">Mailgun</a>
|
|
<a class="dropdown-item" href="" data-server="smtp.office365.com" data-port="587" data-enablessl="true">Office365</a>
|
|
<a class="dropdown-item" href="" data-server="smtp.sendgrid.net" data-port="587" data-enablessl="true">SendGrid</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<form method="post" autocomplete="off">
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
@if (!ViewContext.ModelState.IsValid)
|
|
{
|
|
<div asp-validation-summary="All" class="text-danger"></div>
|
|
}
|
|
<div class="form-group">
|
|
<label asp-for="Settings.Server" class="form-label"></label>
|
|
<input asp-for="Settings.Server" data-fill="server" class="form-control"/>
|
|
<span asp-validation-for="Settings.Server" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.Port" class="form-label"></label>
|
|
<input asp-for="Settings.Port" data-fill="port" class="form-control"/>
|
|
<span asp-validation-for="Settings.Port" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.FromDisplay" class="form-label"></label>
|
|
<input asp-for="Settings.FromDisplay" class="form-control"/>
|
|
<small class="form-text text-muted">
|
|
Some email providers (like Gmail) don't allow you to set your display name, so this setting may not have any effect.
|
|
</small>
|
|
<span asp-validation-for="Settings.FromDisplay" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.From" class="form-label"></label>
|
|
<input asp-for="Settings.From" class="form-control"/>
|
|
<span asp-validation-for="Settings.From" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.Login" class="form-label"></label>
|
|
<input asp-for="Settings.Login" class="form-control"/>
|
|
<small class="form-text text-muted">
|
|
For many email providers (like Gmail) your login is your email address.
|
|
</small>
|
|
<span asp-validation-for="Settings.Login" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
@if (!Model.PasswordSet)
|
|
{
|
|
|
|
<label asp-for="Settings.Password" class="form-label"></label>
|
|
<input asp-for="Settings.Password" type="password" class="form-control"/>
|
|
<span asp-validation-for="Settings.Password" class="text-danger"></span>
|
|
}
|
|
else
|
|
{
|
|
<label asp-for="Settings.Password" class="form-label"></label>
|
|
<div class="input-group">
|
|
<input value="Configured" type="text" readonly class="form-control"/>
|
|
<button type="submit" class="btn btn-danger" name="command" value="ResetPassword">Reset</button>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.EnableSSL" class="form-label"></label>
|
|
<input asp-for="Settings.EnableSSL" type="checkbox" data-fill="enablessl" class="btcpay-toggle ms-2" />
|
|
</div>
|
|
<input asp-for="PasswordSet" type="hidden"/>
|
|
<button type="submit" class="btn btn-primary" name="command" value="Save">Save</button>
|
|
</div>
|
|
</div>
|
|
|
|
<hr class="mt-5 mb-4" />
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<p class="form-text text-muted">
|
|
If you want to test your settings, enter an email address here and click "Send Test Email".
|
|
<strong>Your settings won't be saved</strong>, only a test email will be sent.
|
|
<br />
|
|
After a successful test, you can click "Save".
|
|
</p>
|
|
<label asp-for="TestEmail" class="form-label"></label>
|
|
<input asp-for="TestEmail" class="form-control" />
|
|
<span asp-validation-for="TestEmail" class="text-danger"></span>
|
|
</div>
|
|
<button type="submit" class="btn btn-secondary" name="command" value="Test">Send Test Email</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
delegate('click', '#quick-fill .dropdown-menu a', function (e) {
|
|
e.preventDefault();
|
|
|
|
const data = e.target.dataset;
|
|
Object.keys(data).forEach(function (key) {
|
|
const value = data[key];
|
|
const input = document.querySelector('input[data-fill="' + key + '"]');
|
|
if (input) {
|
|
const type = input.getAttribute('type');
|
|
if (type === 'checkbox') {
|
|
input.checked = value;
|
|
} else {
|
|
input.value = value;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|