mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
* Introduce very flexible form input system * Refactorings after rebase * Test fix * Update BTCPayServer/Forms/FormDataService.cs --------- Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
12 lines
410 B
Text
12 lines
410 B
Text
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@using BTCPayServer.Forms
|
|
@model BTCPayServer.Abstractions.Form.Form
|
|
@inject FormComponentProviders FormComponentProviders
|
|
|
|
@foreach (var field in Model.Fields)
|
|
{
|
|
if (FormComponentProviders.TypeToComponentProvider.TryGetValue(field.Type, out var partial) && !string.IsNullOrEmpty(partial.View))
|
|
{
|
|
<partial name="@partial.View" for="@field" />
|
|
}
|
|
}
|