2021-09-07 04:55:53 +02:00
|
|
|
using System;
|
|
|
|
|
2017-10-23 22:55:46 +09:00
|
|
|
namespace BTCPayServer.Models
|
|
|
|
{
|
|
|
|
public class ConfirmModel
|
|
|
|
{
|
2021-09-07 04:55:53 +02:00
|
|
|
private const string ButtonClassDefault = "btn-danger";
|
|
|
|
|
|
|
|
public ConfirmModel() {}
|
2019-02-10 12:25:51 -06:00
|
|
|
|
2021-10-09 05:18:37 +02:00
|
|
|
public ConfirmModel(string title, string desc, string action = null, string buttonClass = ButtonClassDefault, string actionUrl = null)
|
2019-02-10 12:25:51 -06:00
|
|
|
{
|
|
|
|
Title = title;
|
|
|
|
Description = desc;
|
|
|
|
Action = action;
|
2021-09-07 04:55:53 +02:00
|
|
|
ButtonClass = buttonClass;
|
2019-02-10 12:25:51 -06:00
|
|
|
|
2021-09-07 04:55:53 +02:00
|
|
|
if (Description.Contains("<strong>", StringComparison.InvariantCultureIgnoreCase))
|
|
|
|
{
|
|
|
|
DescriptionHtml = true;
|
|
|
|
}
|
2021-10-09 05:18:37 +02:00
|
|
|
|
|
|
|
ActionUrl = actionUrl;
|
2017-10-27 17:53:04 +09:00
|
|
|
}
|
2020-07-13 08:13:27 +02:00
|
|
|
|
2021-09-07 04:55:53 +02:00
|
|
|
public string Title { get; set; }
|
|
|
|
public string Description { get; set; }
|
|
|
|
public bool DescriptionHtml { get; set; }
|
|
|
|
public string Action { get; set; }
|
|
|
|
public string ButtonClass { get; set; } = ButtonClassDefault;
|
2020-02-26 10:26:38 +01:00
|
|
|
public string ActionUrl { get; set; }
|
2017-10-27 17:53:04 +09:00
|
|
|
}
|
2017-10-23 22:55:46 +09:00
|
|
|
}
|