btcpayserver/BTCPayServer/Views/AppsPublic/Crowdfund/ContributeForm.cshtml

73 lines
2.6 KiB
Text
Raw Normal View History

2018-12-22 15:02:16 +01:00
@model BTCPayServer.Models.AppViewModels.ContributeToCrowdfund
<form method="post">
2019-01-02 14:07:21 +01:00
@foreach (var item in Model.ViewCrowdfundViewModel.Perks)
{
<div class="card mb-4 perk expanded" id="@item.Id">
@if (!string.IsNullOrEmpty(item.Image))
{
<img class="card-img-top" src="@item.Image" />
}
<div class="card-body">
<div class="card-title d-flex justify-content-between" >
<label class="h5">
2019-01-07 14:39:04 +01:00
@if (Model.ViewCrowdfundViewModel.Started && !Model.ViewCrowdfundViewModel.Ended && (item.Price.Value > 0 || item.Custom))
2019-01-02 14:07:21 +01:00
{
<input type="radio" asp-for="ChoiceKey" value="@item.Id"/>
}
@(string.IsNullOrEmpty(item.Title) ? item.Id : item.Title)
</label>
<span class="text-muted">
@if (item.Price.Value > 0)
{
@item.Price.Value
if (item.Custom)
{
Html.Raw("or more");
}
}else if (item.Custom)
{
Html.Raw("Any amount");
}
</span>
</div>
2019-01-06 13:50:30 +01:00
<p class="card-text overflow-hidden" >@Html.Raw(item.Description)</p>
2019-01-02 14:07:21 +01:00
</div>
2019-01-08 15:10:05 +01:00
@if (Model.ViewCrowdfundViewModel.PerkCount.ContainsKey(item.Id))
{
<div class="card-footer text-right">
@Model.ViewCrowdfundViewModel.PerkCount[item.Id] Contributors
</div>
}
2019-01-02 14:07:21 +01:00
</div>
}
2019-01-07 14:39:04 +01:00
@if (Model.ViewCrowdfundViewModel.Started && !Model.ViewCrowdfundViewModel.Ended)
2019-01-02 14:07:21 +01:00
{
2018-12-22 15:02:16 +01:00
<div class="form-group">
<label asp-for="Email"></label>
<input asp-for="Email" type="email" class="form-control"/>
<span asp-validation-for="Email" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Amount"></label>
<div class="input-group mb-3">
<input asp-for="Amount" type="number" step="any" class="form-control"/>
<div class="input-group-append">
<span class="input-group-text">@Model.ViewCrowdfundViewModel.TargetCurrency.ToUpperInvariant()</span>
</div>
</div>
<span asp-validation-for="Amount" class="text-danger"></span>
</div>
<input type="hidden" asp-for="RedirectToCheckout"/>
2019-01-02 14:07:21 +01:00
<button type="submit" class="btn btn-primary" >Contribute</button>
}
2018-12-22 15:02:16 +01:00
</form>