mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Edit view for Pull Payments (#4016)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
This commit is contained in:
@@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using BTCPayServer.Payments;
|
||||
using BTCPayServer.Client.Models;
|
||||
using BTCPayServer.Data;
|
||||
|
||||
namespace BTCPayServer.Models.WalletViewModels
|
||||
{
|
||||
@@ -70,4 +71,37 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
[Display(Name = "Automatically approve claims")]
|
||||
public bool AutoApproveClaims { get; set; } = false;
|
||||
}
|
||||
|
||||
public class UpdatePullPaymentModel
|
||||
{
|
||||
|
||||
public string Id { get; set; }
|
||||
|
||||
public UpdatePullPaymentModel()
|
||||
{
|
||||
}
|
||||
|
||||
public UpdatePullPaymentModel(Data.PullPaymentData data)
|
||||
{
|
||||
if (data == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Id = data.Id;
|
||||
var blob = data.GetBlob();
|
||||
Name = blob.Name;
|
||||
Description = blob.Description;
|
||||
CustomCSSLink = blob.View.CustomCSSLink;
|
||||
EmbeddedCSS = blob.View.EmbeddedCSS;
|
||||
}
|
||||
|
||||
[MaxLength(30)]
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
[Display(Name = "Custom CSS URL")]
|
||||
public string CustomCSSLink { get; set; }
|
||||
[Display(Name = "Custom CSS Code")]
|
||||
public string EmbeddedCSS { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user