Updating idents, code formatting

This commit is contained in:
rockstardev
2020-01-23 20:19:24 -06:00
parent f99058a9fa
commit a83edce4dc
6 changed files with 70 additions and 59 deletions

View File

@@ -10,11 +10,15 @@ namespace BTCPayServer.Models.AppViewModels
public class UpdateCrowdfundViewModel public class UpdateCrowdfundViewModel
{ {
public string StoreId { get; set; } public string StoreId { get; set; }
[Required] [MaxLength(30)] public string Title { get; set; } [Required]
[MaxLength(30)]
public string Title { get; set; }
[MaxLength(50)] public string Tagline { get; set; } [MaxLength(50)]
public string Tagline { get; set; }
[Required] public string Description { get; set; } [Required]
public string Description { get; set; }
[Display(Name = "Featured Image")] [Display(Name = "Featured Image")]
public string MainImageUrl { get; set; } public string MainImageUrl { get; set; }
@@ -59,7 +63,8 @@ namespace BTCPayServer.Models.AppViewModels
public IEnumerable<string> ResetEveryValues = Enum.GetNames(typeof(CrowdfundResetEvery)); public IEnumerable<string> ResetEveryValues = Enum.GetNames(typeof(CrowdfundResetEvery));
[Display(Name = "Reset goal every")] public string ResetEvery { get; set; } = nameof(CrowdfundResetEvery.Never); [Display(Name = "Reset goal every")]
public string ResetEvery { get; set; } = nameof(CrowdfundResetEvery.Never);
public int ResetEveryAmount { get; set; } = 1; public int ResetEveryAmount { get; set; } = 1;
@@ -95,5 +100,13 @@ namespace BTCPayServer.Models.AppViewModels
public string AnimationColors { get; set; } public string AnimationColors { get; set; }
public bool NotificationEmailWarning { get; set; } public bool NotificationEmailWarning { get; set; }
// NOTE: Improve validation if needed
public bool ModelWithMinimumData
{
get { return Description != null && Title != null && TargetCurrency != null; }
}
} }
} }

View File

@@ -263,8 +263,7 @@
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<label>Price</label>* <label>Price</label>*
<input <input class="js-product-price form-control mb-2"
class="js-product-price form-control mb-2"
inputmode="numeric" inputmode="numeric"
pattern="\d*" pattern="\d*"
step="any" step="any"

View File

@@ -261,8 +261,7 @@
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<label>Price</label>* <label>Price</label>*
<input <input class="js-product-price form-control mb-2"
class="js-product-price form-control mb-2"
inputmode="numeric" inputmode="numeric"
pattern="\d*" pattern="\d*"
type="number" type="number"