From 0936812df071d9242a3eaa413aa6bb5ffe42872f Mon Sep 17 00:00:00 2001 From: Andrew Camilleri Date: Tue, 7 May 2019 08:01:37 +0000 Subject: [PATCH] Fix date time issues on crowdfund.payment requests (#808) * fix some conditional display bugs in crowdfund * bump flatpickr * make clear button show up even with flatpickt fake input ui * update uis to specify date value in specific format and use custom format for flatpickr display and use moment to parse date instead * fix remaining public ui date issues --- .../Views/Apps/UpdateCrowdfund.cshtml | 12 +++++- .../AppsPublic/Crowdfund/VueCrowdfund.cshtml | 42 +++++++++---------- .../PaymentRequest/EditPaymentRequest.cshtml | 8 +++- BTCPayServer/wwwroot/crowdfund-admin/main.js | 13 ++++-- BTCPayServer/wwwroot/crowdfund/app.js | 10 +++-- .../wwwroot/crowdfund/styles/main.css | 4 ++ BTCPayServer/wwwroot/main/site.js | 14 ++++--- .../wwwroot/payment-request-admin/main.js | 13 ++++-- BTCPayServer/wwwroot/payment-request/app.js | 4 +- .../wwwroot/vendor/flatpickr/flatpickr.js | 4 +- .../vendor/flatpickr/flatpickr.min.css | 2 +- 11 files changed, 81 insertions(+), 45 deletions(-) diff --git a/BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml b/BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml index 9986b3bf8..dd6acdb04 100644 --- a/BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml +++ b/BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml @@ -1,4 +1,5 @@ @addTagHelper *, BundlerMinifier.TagHelpers +@using System.Globalization @model UpdateCrowdfundViewModel @{ ViewData["Title"] = "Update Crowdfund"; @@ -67,7 +68,9 @@
- +
-
+
{{ raisedAmount }} {{targetCurrency}}
Raised
@@ -73,23 +73,7 @@
Contributors
-
-
- {{endDiff}} -
-
Left
- -
    -
  • - {{started? "Started" : "Starts"}} {{startDate}} -
  • -
  • - {{ended? "Ended" : "Ends"}} {{endDate}} -
  • -
-
-
-
+
{{startDiff}}
@@ -106,7 +90,23 @@
-
+
+
+ {{endDiff}} +
+
Left
+ +
    +
  • + {{started? "Started" : "Starts"}} {{startDate}} +
  • +
  • + {{ended? "Ended" : "Ends"}} {{endDate}} +
  • +
+
+
+
Campaign
diff --git a/BTCPayServer/Views/PaymentRequest/EditPaymentRequest.cshtml b/BTCPayServer/Views/PaymentRequest/EditPaymentRequest.cshtml index fcc5f1576..01f6a212e 100644 --- a/BTCPayServer/Views/PaymentRequest/EditPaymentRequest.cshtml +++ b/BTCPayServer/Views/PaymentRequest/EditPaymentRequest.cshtml @@ -1,4 +1,5 @@ @using BTCPayServer.Services.PaymentRequests +@using System.Globalization @model BTCPayServer.Models.PaymentRequestViewModels.UpdatePaymentRequestViewModel @addTagHelper *, BundlerMinifier.TagHelpers @@ -66,7 +67,10 @@
- +