mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
c3f73c0de3
* updates * updates * updates * updates * updates * moves api key CTA to top right * updates * more updates * more updates * Fix active state when "Account" is selected * Update wording in subnav: Profile becomes Account * Fix email test * Update Emails wording * Try to fix email test * Make General first tab in store settings Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
260 lines
15 KiB
Plaintext
260 lines
15 KiB
Plaintext
@addTagHelper *, BundlerMinifier.TagHelpers
|
|
@using System.Globalization
|
|
@model UpdateCrowdfundViewModel
|
|
@{
|
|
ViewData.SetActivePage(AppsNavPages.Update, $"Update Crowdfund: {Model.AppName}", Model.AppId);
|
|
}
|
|
|
|
@section PageHeadContent {
|
|
<bundle name="wwwroot/bundles/crowdfund-admin-bundle.min.css" asp-append-version="true"></bundle>
|
|
}
|
|
|
|
@section PageFootContent {
|
|
<partial name="_ValidationScriptsPartial" />
|
|
<bundle name="wwwroot/bundles/crowdfund-admin-bundle.min.js" asp-append-version="true"></bundle>
|
|
}
|
|
|
|
<partial name="_StatusMessage" />
|
|
|
|
<h2 class="mb-4">@ViewData["Title"]</h2>
|
|
|
|
<form method="post">
|
|
<input type="hidden" asp-for="StoreId" />
|
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-6">
|
|
<div class="form-group">
|
|
<label asp-for="AppName" class="form-label" data-required></label>
|
|
<input asp-for="AppName" class="form-control" required />
|
|
<span asp-validation-for="AppName" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Title" class="form-label" data-required></label>
|
|
<input asp-for="Title" class="form-control" required />
|
|
<span asp-validation-for="Title" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Tagline" class="form-label"></label>
|
|
<input asp-for="Tagline" class="form-control" />
|
|
<span asp-validation-for="Tagline" class="text-danger"></span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-9">
|
|
<div class="form-group">
|
|
<label asp-for="Description" class="form-label" data-required></label>
|
|
<textarea asp-for="Description" rows="20" cols="40" class="form-control richtext"></textarea>
|
|
<span asp-validation-for="Description" class="text-danger"></span>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<div class="form-group">
|
|
<label asp-for="TargetCurrency" class="form-label"></label>
|
|
<input asp-for="TargetCurrency" class="form-control" placeholder="Use store's default settings" />
|
|
<span asp-validation-for="TargetCurrency" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="TargetAmount" class="form-label"></label>
|
|
<input asp-for="TargetAmount" class="form-control" />
|
|
<span asp-validation-for="TargetAmount" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="StartDate" class="form-label"></label>
|
|
<div class="input-group">
|
|
<input type="datetime-local" asp-for="StartDate"
|
|
value="@(Model.StartDate?.ToString("u", CultureInfo.InvariantCulture))"
|
|
class="form-control flatdtpicker"
|
|
placeholder="No start date has been set" />
|
|
<button class="btn btn-secondary input-group-clear" type="button" title="Clear">
|
|
<span class="fa fa-times"></span>
|
|
</button>
|
|
</div>
|
|
<span asp-validation-for="StartDate" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="EndDate" class="form-label"></label>
|
|
<div class="input-group">
|
|
<input type="datetime-local" asp-for="EndDate"
|
|
value="@(Model.EndDate?.ToString("u", CultureInfo.InvariantCulture))"
|
|
class="form-control flatdtpicker"
|
|
placeholder="No end date has been set" />
|
|
<button class="btn btn-secondary input-group-clear input-group-text" type="button" title="Clear">
|
|
<span class="fa fa-times"></span>
|
|
</button>
|
|
</div>
|
|
<span asp-validation-for="EndDate" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group mb-4">
|
|
<label asp-for="ResetEvery" class="form-label"></label>
|
|
<div class="input-group">
|
|
<input type="number" asp-for="ResetEveryAmount" placeholder="Amount" class="form-control">
|
|
<select class="form-select" asp-for="ResetEvery">
|
|
@foreach (var opt in Model.ResetEveryValues)
|
|
{
|
|
<option value="@opt">@opt</option>
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group mb-3">
|
|
<div class="d-flex align-items-center mb-3">
|
|
<input asp-for="Enabled" type="checkbox" class="btcpay-toggle me-2"/>
|
|
<label asp-for="Enabled" class="form-label mb-0"></label>
|
|
</div>
|
|
<span asp-validation-for="Enabled" class="text-danger"></span>
|
|
<div class="text-muted" hidden="@Model.Enabled">The crowdfund is only visible to you. To make it visible to anyone else, enable this.</div>
|
|
<div class="text-muted" hidden="@(!Model.Enabled)">The crowdfund is visible to anyone. To make it only visible to you, disable this.</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-12">
|
|
<partial name="TemplateEditor" model="@(nameof(Model.PerksTemplate), "Perks")" />
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<div class="form-group">
|
|
<label asp-for="PerksTemplate" class="form-label"></label>
|
|
<textarea asp-for="PerksTemplate" rows="10" cols="40" class="js-product-template form-control"></textarea>
|
|
<span asp-validation-for="PerksTemplate" class="text-danger"></span>
|
|
</div>
|
|
<h3 class="mt-5 mb-4">Contributions</h3>
|
|
<div class="form-check mb-3">
|
|
<input asp-for="SortPerksByPopularity" type="checkbox" class="form-check-input" />
|
|
<label asp-for="SortPerksByPopularity" class="form-check-label"></label>
|
|
<span asp-validation-for="SortPerksByPopularity" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-check mb-3">
|
|
<input asp-for="DisplayPerksRanking" type="checkbox" class="form-check-input" />
|
|
<label asp-for="DisplayPerksRanking" class="form-check-label"></label>
|
|
<span asp-validation-for="DisplayPerksRanking" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-check mb-3">
|
|
<input asp-for="DisplayPerksValue" type="checkbox" class="form-check-input" />
|
|
<label asp-for="DisplayPerksValue" class="form-check-label"></label>
|
|
<span asp-validation-for="DisplayPerksValue" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-check mb-3">
|
|
<input asp-for="EnforceTargetAmount" type="checkbox" class="form-check-input" />
|
|
<label asp-for="EnforceTargetAmount" class="form-check-label"></label>
|
|
<span asp-validation-for="EnforceTargetAmount" class="text-danger"></span>
|
|
</div>
|
|
<h3 class="mt-5 mb-4">Crowdfund Behavior</h3>
|
|
<div class="form-group">
|
|
<label asp-for="NotificationUrl" class="form-label"></label>
|
|
<input asp-for="NotificationUrl" class="form-control" />
|
|
<span asp-validation-for="NotificationUrl" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-check">
|
|
<input asp-for="UseAllStoreInvoices" type="checkbox" class="form-check-input" />
|
|
<label asp-for="UseAllStoreInvoices" class="form-check-label"></label>
|
|
<span asp-validation-for="UseAllStoreInvoices" class="text-danger"></span>
|
|
</div>
|
|
<h3 class="mt-5 mb-4">Sound</h3>
|
|
<div class="form-group mb-3">
|
|
<div class="d-flex align-items-center mb-3">
|
|
<input asp-for="SoundsEnabled" type="checkbox" class="btcpay-toggle me-2" data-bs-toggle="collapse" data-bs-target="#SoundsEnabledSettings" aria-expanded="@Model.SoundsEnabled" aria-controls="SoundsEnabledSettings"/>
|
|
<label asp-for="SoundsEnabled" class="form-label mb-0"></label>
|
|
</div>
|
|
<span asp-validation-for="SoundsEnabled" class="text-danger"></span>
|
|
</div>
|
|
<div class="collapse @(Model.SoundsEnabled ? "show" : "")" id="SoundsEnabledSettings">
|
|
<div class="form-group mb-0 pb-3">
|
|
<label asp-for="Sounds" class="form-label"></label>
|
|
<textarea asp-for="Sounds" class="form-control"></textarea>
|
|
<span asp-validation-for="Sounds" class="text-danger"></span>
|
|
</div>
|
|
</div>
|
|
<h3 class="mt-5 mb-4">Animation</h3>
|
|
<div class="form-group mb-3">
|
|
<div class="d-flex align-items-center mb-3">
|
|
<input asp-for="AnimationsEnabled" type="checkbox" class="btcpay-toggle me-2" data-bs-toggle="collapse" data-bs-target="#AnimationsEnabledSettings" aria-expanded="@Model.AnimationsEnabled" aria-controls="AnimationsEnabledSettings"/>
|
|
<label asp-for="AnimationsEnabled" class="form-label mb-0"></label>
|
|
</div>
|
|
<span asp-validation-for="AnimationsEnabled" class="text-danger"></span>
|
|
</div>
|
|
<div class="collapse @(Model.AnimationsEnabled ? "show" : "")" id="AnimationsEnabledSettings">
|
|
<div class="form-group mb-0 pb-3">
|
|
<label asp-for="AnimationColors" class="form-label"></label>
|
|
<textarea asp-for="AnimationColors" class="form-control"></textarea>
|
|
<span asp-validation-for="AnimationColors" class="text-danger"></span>
|
|
</div>
|
|
</div>
|
|
<h3 class="mt-5 mb-4">Discussion</h3>
|
|
<div class="form-group mb-3">
|
|
<div class="d-flex align-items-center mb-3">
|
|
<input asp-for="DisqusEnabled" type="checkbox" class="btcpay-toggle me-2" data-bs-toggle="collapse" data-bs-target="#DisqusEnabledSettings" aria-expanded="@Model.DisqusEnabled" aria-controls="DisqusEnabledSettings"/>
|
|
<label asp-for="DisqusEnabled" class="form-label mb-0"></label>
|
|
</div>
|
|
<span asp-validation-for="DisqusEnabled" class="text-danger"></span>
|
|
</div>
|
|
<div class="collapse @(Model.DisqusEnabled ? "show" : "")" id="DisqusEnabledSettings">
|
|
<div class="form-group mb-0 pb-3">
|
|
<label asp-for="DisqusShortname" class="form-label"></label>
|
|
<input asp-for="DisqusShortname" class="form-control" />
|
|
<span asp-validation-for="DisqusShortname" class="text-danger"></span>
|
|
</div>
|
|
</div>
|
|
|
|
<h3 class="mt-5 mb-2">Additional Options</h3>
|
|
<div class="form-group">
|
|
<div class="accordion" id="additional">
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header" id="additional-custom-css-header">
|
|
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#additional-custom-css" aria-expanded="false" aria-controls="additional-custom-css">
|
|
Custom CSS
|
|
<vc:icon symbol="caret-down" />
|
|
</button>
|
|
</h2>
|
|
<div id="additional-custom-css" class="accordion-collapse collapse" aria-labelledby="additional-custom-css-header">
|
|
<div class="accordion-body">
|
|
<div class="form-group">
|
|
<label asp-for="MainImageUrl" class="form-label"></label>
|
|
<input asp-for="MainImageUrl" class="form-control" />
|
|
<span asp-validation-for="MainImageUrl" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="CustomCSSLink" class="form-label"></label>
|
|
<a href="https://docs.btcpayserver.org/Development/Theme/#2-bootstrap-themes" target="_blank" rel="noreferrer noopener">
|
|
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>
|
|
</a>
|
|
<input asp-for="CustomCSSLink" class="form-control" />
|
|
<span asp-validation-for="CustomCSSLink" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group mb-4">
|
|
<label asp-for="EmbeddedCSS" class="form-label"></label>
|
|
<textarea asp-for="EmbeddedCSS" rows="10" cols="40" class="form-control"></textarea>
|
|
<span asp-validation-for="EmbeddedCSS" class="text-danger"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-9 mt-2 mb-5">
|
|
<div class="d-grid gap-3 d-md-block">
|
|
<button type="submit" class="btn btn-primary me-md-2" id="SaveSettings">Save Settings</button>
|
|
<div class="btn-group me-md-2">
|
|
<a class="btn btn-secondary flex-grow-1" asp-action="ListInvoices" asp-controller="UIInvoice" asp-route-storeId="@Model.StoreId" asp-route-searchterm="@Model.SearchTerm">Invoices</a>
|
|
<a class="btn btn-secondary px-3 flex-grow-0" asp-action="ListInvoices" asp-controller="UIInvoice" asp-route-storeId="@Model.StoreId" asp-route-searchterm="@Model.SearchTerm"
|
|
target="viewinvoices_@Model.AppId"><span class="fa fa-external-link"></span></a>
|
|
</div>
|
|
@if (Model.ModelWithMinimumData)
|
|
{
|
|
<div class="btn-group">
|
|
<a class="btn btn-secondary flex-grow-1" asp-action="ViewCrowdfund" asp-controller="UIAppsPublic" asp-route-appId="@Model.AppId" id="ViewApp">View Crowdfund</a>
|
|
<a class="btn btn-secondary px-3 flex-grow-0" asp-action="ViewCrowdfund" asp-controller="UIAppsPublic" asp-route-appId="@Model.AppId"
|
|
target="viewapp_@Model.AppId"><span class="fa fa-external-link"></span></a>
|
|
</div>
|
|
}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<h3 class="mt-5 mb-4">Other Actions</h3>
|
|
<div id="danger-zone">
|
|
<a id="DeleteApp" class="btn btn-outline-danger mb-5" asp-action="DeleteApp" asp-route-appId="@Model.AppId" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-description="The app <strong>@Model.AppName</strong> and its settings will be permanently deleted." data-confirm-input="DELETE">Delete this app</a>
|
|
</div>
|
|
|
|
<partial name="_Confirm" model="@(new ConfirmModel("Delete app", "This app will be removed from this store.", "Delete"))" />
|