2021-09-07 04:55:53 +02:00
|
|
|
using System;
|
|
|
|
|
2017-10-23 15:55:46 +02:00
|
|
|
namespace BTCPayServer.Models
|
|
|
|
{
|
|
|
|
public class ConfirmModel
|
|
|
|
{
|
2021-09-07 04:55:53 +02:00
|
|
|
private const string ButtonClassDefault = "btn-danger";
|
2021-12-31 08:59:02 +01:00
|
|
|
|
|
|
|
public ConfirmModel() { }
|
2019-02-10 19:25:51 +01:00
|
|
|
|
2022-01-14 12:16:28 +01:00
|
|
|
public ConfirmModel(string title, string desc, string action = null, string buttonClass = ButtonClassDefault, string actionName = null, string controllerName = null)
|
2019-02-10 19:25:51 +01:00
|
|
|
{
|
|
|
|
Title = title;
|
|
|
|
Description = desc;
|
|
|
|
Action = action;
|
2022-01-14 12:16:28 +01:00
|
|
|
ActionName = actionName;
|
|
|
|
ControllerName = controllerName;
|
2021-09-07 04:55:53 +02:00
|
|
|
ButtonClass = buttonClass;
|
2019-02-10 19:25:51 +01:00
|
|
|
|
2021-09-07 04:55:53 +02:00
|
|
|
if (Description.Contains("<strong>", StringComparison.InvariantCultureIgnoreCase))
|
|
|
|
{
|
|
|
|
DescriptionHtml = true;
|
|
|
|
}
|
2017-10-27 10:53:04 +02: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; }
|
2022-01-14 12:16:28 +01:00
|
|
|
public string ActionName { get; set; }
|
|
|
|
public string ControllerName { get; set; }
|
2021-09-07 04:55:53 +02:00
|
|
|
public string ButtonClass { get; set; } = ButtonClassDefault;
|
2017-10-27 10:53:04 +02:00
|
|
|
}
|
2017-10-23 15:55:46 +02:00
|
|
|
}
|