Files
btcpayserver/BTCPayServer/Views/UIUserStores/_CreateStoreForm.cshtml
Nicolas Dorier 1e79730c6e Implement store templates (#6704)
* Implement store templates

* Use the template for the default rate rules

* Polish messages

* Do not show exchange selection if template has a script
2025-05-09 15:58:24 +09:00

32 lines
1.5 KiB
Plaintext

@model BTCPayServer.Models.StoreViewModels.CreateStoreViewModel
<form asp-action="CreateStore">
<input type="hidden" asp-for="CanEditPreferredExchange"/>
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="ModelOnly"></div>
}
<div class="form-group">
<label asp-for="Name" class="form-label" data-required></label>
<input asp-for="Name" class="form-control w-300px" required />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="DefaultCurrency" class="form-label" data-required></label>
<input asp-for="DefaultCurrency" class="form-control w-300px" currency-selection />
<span asp-validation-for="DefaultCurrency" class="text-danger"></span>
</div>
@if (Model.CanEditPreferredExchange)
{
<div class="form-group">
<label asp-for="PreferredExchange" class="form-label" data-required></label>
<select asp-for="PreferredExchange" asp-items="Model.Exchanges" class="form-select w-300px"></select>
<div class="form-text mt-2 only-for-js" text-translate="true">The recommended price source gets chosen based on the default currency.</div>
<span asp-validation-for="PreferredExchange" class="text-danger"></span>
</div>
}
<div class="form-group mt-4">
<input type="submit" value="Create Store" class="btn btn-primary @(Model.IsFirstStore ? "w-100" : null)" id="Create" />
</div>
</form>