mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-28 16:58:00 +01:00
* Improve and unify page headers * Altcoin test fixes * Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> * Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> * Fix missing store name in pairing view * Fix CanUsePairing test * Bump header navigation font size * Use partial tag instead of Html.PartialAsync in views As suggested by @nicolasdorier. These are equivalent, see details [here](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/partial?view=aspnetcore-3.1#partial-tag-helper). * Fix docs link As in #2432. * Update BTCPayServer/Views/Wallets/SignWithSeed.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> * Update BTCPayServer/Views/Wallets/WalletSendVault.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> * Update BTCPayServer/Views/Wallets/WalletTransactions.cshtml Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com> Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
142 lines
6.4 KiB
Text
142 lines
6.4 KiB
Text
@model BTCPayServer.Models.ServerViewModels.EmailsViewModel
|
|
|
|
<partial name="_StatusMessage" />
|
|
|
|
<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 quick-fill" style="display: none">
|
|
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
Quick fill settings for...
|
|
</button>
|
|
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
|
<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"></label>
|
|
<input asp-for="Settings.Server" class="form-control"/>
|
|
<span asp-validation-for="Settings.Server" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.Port"></label>
|
|
<input asp-for="Settings.Port" class="form-control"/>
|
|
<span asp-validation-for="Settings.Port" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Settings.FromDisplay"></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"></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"></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"></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"></label>
|
|
<div class="input-group">
|
|
<input value="Configured" type="text" readonly class="form-control"/>
|
|
<div class="input-group-append">
|
|
<button type="submit" class="btn btn-danger" name="command" value="ResetPassword">Reset</button>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-check">
|
|
<input asp-for="Settings.EnableSSL" type="checkbox" class="form-check-input"/>
|
|
<label asp-for="Settings.EnableSSL" class="form-check-label"></label>
|
|
</div>
|
|
</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"></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).ready(function () {
|
|
$('.dropdown.quick-fill').show();
|
|
$('.dropdown.quick-fill a').click(function (e) {
|
|
e.preventDefault();
|
|
|
|
var aNode = $(this);
|
|
var data = aNode.data();
|
|
|
|
for (var key in data) {
|
|
var value = data[key];
|
|
var inputNodes = $('input[name*="Settings.' + key + '" i]');
|
|
|
|
if (inputNodes.length) {
|
|
inputNodes.each(function (i, input) {
|
|
input = $(input);
|
|
var type = input.attr('type');
|
|
if (type === 'checkbox') {
|
|
input.prop('checked', value);
|
|
|
|
} else {
|
|
input.val(value);
|
|
}
|
|
});
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|