* Store Branding: Refactoring and logo as favicon
- Encapsulates store branding properties into their own view model
- Uses the logo as favicon on public pages
* Refactorings
* Updates
* Improve receipt info display
Displays the info in correct order and adds optional info if tip was given with a percentage.
* Test fix
---------
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Fix constant fields being editable on UI
* fix redirect to checkout if invoice is settled (redirect to receipt instead)
* enhance: make mirror field type able to map values
* Introduce invoice amount adjustment fields for form
* Integrate invoice amount adjustment fields for form on pos
* Support mirror in editor
* Indicate when special field names are used
* polsih mirror view and name suggestions for fields
* clarify
* hide hidden field from ui
* Minor adjustmentts
* Improve mirror field editing
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Add grouping feature to the PoS with Cart
* Improve UI
* Rename groups to categories
* Make it easier to select categories of the items
* Refactor TemplateEditor, use TomSelect for categories
* Prevent Vue code insertion
* Prevent empty categories
* Add label ids
* Add test case
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Remove Order ID link
* Add separate print version for receipt
* Fix POS number handling and add keypad test
Fixes#5056.
* Add formatting function
* Remove OrderUrl for POS, bring back order link for receipt
* Update BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs
* Show correct array regardless of size
fixes#4890
* Email provided to pos form was not forwarded to form
fixes#4810
* Make invoice receipt url redirect to the invoice redirect url if receipt is not enabled
When setting up a default email rule upon invoice settlement, you would link to the receipt page naturally. However, if using the payment requests, receipts are disabled as the payment request itself is the receipt. This commit makes the receipt url redirect to the invoice redirect url if available, and in the case of payment requests, it would mean the receipt url is the payment request url. fixes#4895
* Set the email address in the form when configured in the payment request
* fix pay request email copy
* fix payouts nav link
fixes#4788
* Update BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
---------
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Introduce very flexible form input system
* Refactorings after rebase
* Test fix
* Update BTCPayServer/Forms/FormDataService.cs
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Plugins can now build apps
* fix tests
* fixup
* pluginize existing apps
* Test fixes part 1
* Test fixes part 2
* Fix Crowdfund namespace
* Syntax
* More namespace fixes
* Markup
* Test fix
* upstream fixes
* Add plugin icon
* Fix nullable build warnings
* allow pre popualting app creation
* Fixes after merge
* Make link methods async
* Use AppData as parameter for ConfigureLink
* GetApps by AppType
* Use ConfigureLink on dashboard
* Rename method
* Add properties to indicate stats support
* Property updates
* Test fixes
* Clean up imports
* Fixes after merge
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Unset X-Frame-Options header correctly
According to the [spec](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) there are onlye the `DENY` and `SAMEORIGIN` options, `ALLOW-FROM` being deprecated. Hence we have to actively unset the header, as we made `DENY` the default.
This also unsets the X-Frame-Options header for the public form pages, which fixes#4666.
* Ignore anti forgery token in Forms
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* add invocie metadata as a tab
* Allow forms to add to posdata too in pos app
* Cleanup view
* Display additional information directly
* Update BTCPayServer/Views/Shared/PosData.cshtml
* Update BTCPayServer/Models/InvoicingModels/InvoiceDetailsModel.cs
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Custom Forms
* Update BTCPayServer.Data/Migrations/20230125085242_AddForms.cs
* Cleanups
* Explain public form
* Add store branding
* Add form name to POS form
* add tests
* fix migration
* Minor cleanups
* Code improvements
* Add form validation
Closes#4317.
* Adapt form validation for Bootstrap 5
* update logic for forms
* pr changes
* Minor code cleanup
* Remove unused parameters
* Refactor Form data handling to avoid O(n3) issues
* Rename Hidden to Constant
* Pre-populate FormView from the query string params
* Fix test
---------
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Editorconfig: Add space_before_self_closing setting
This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html
* Editorconfig: Keep 4 spaces indentation for Swagger JSON files
They are all formatted that way, let's keep it like that.
* Apply dotnet-format, mostly white-space related changes
* wip
* Cleanups
* UI updates
* Update UIFormsController.cs
* Make predefined forms usable statically
* Add support for pos app + forms
* pay request form rough support
* invoice form through receipt page
* Display form name in inherit from store setting
* Do not request additional forms on invoice from pay request
* fix up code
* move checkoutform id in checkout appearance outside of checkotu v2 toggle
* general fixes for form system
* fix pav bug
* UI updates
* Fix warnings in Form builder (#4331)
* Fix build warnings about string?
Enable nullable on UIFormsController.cs
Fixes CS8632 The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
* Clean up lack of space in injected services in Submit() of UIFormsController.cs
* Remove unused variables (CS0219) and assignment of nullable value to nullable type (CS8600)
* Cleanup double semicolons while we're at tit
* Fix: If reverse proxy wasn't well configured, and error message should have been displayed (#4322)
* fix monero issue
* Server Settings: Update Policies page (#4326)
Handles the multiple submit buttons on that page and closes#4319.
Contains some UI unifications with other pages and also shows the block explorers without needing to toggle the section via JS.
* Change confirmed to settled. (#4328)
* POS: Fix null pointer
Introduced in #4307, the referenced object needs to be `itemChoice` instead of `choice`.
* Add documentation link to plugins (#4329)
* Add documentation link to plugins
* Minor UI updates
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Fix flaky test (#4330)
* Fix flaky test
* Update BTCPayServer/PayoutProcessors/BaseAutomatedPayoutProcessor.cs
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: d11n <mail@dennisreimann.de>
* Remove invoice and store level form
* add form test
* fix migration for forms
* fix
* make pay request form submission redirect to invoice
* Refactor FormQuery to only be able to query single store and single form
* Put the Authorize at controller level on UIForms
* Fix warnings
* Fix ef request
* Fix query to forms, ensure no permission bypass
* Fix modify
* Remove storeId from step form
* Remove useless storeId parameter
* Hide custom form feature in UI
* Minor cleanups
* Remove custom form options from select for now
* More minor syntax cleanups
* Update test
* Add index - needs migration
* Refactoring: Use PostRedirect instead of TempData for data transfer
* Remove untested and unfinished code
* formResponse should be a JObject, not a string
* Fix case for Form type
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: JesterHodl <103882255+jesterhodl@users.noreply.github.com>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: Andreas Tasch <andy.tasch@gmail.com>
* Opt-in for new checkout
* Update wording
* Create invoice view update
* Remove jQuery from checkout testing code
* Checkout v2 basics
* WIP
* WIP 2
* Updates and fixes
* Updates
* Design updates
* More design updates
* Cheating and JS fixes
* Use checkout form id whenever invoices get created
* Improve email form handling
* Cleanups
* Payment method exclusion cases for Lightning and LNURL
TODO: Cases and implementation need to be discussed
* Introduce CheckoutType in API and replace UseNewCheckout in backend
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
The custom amount option was disabled by default in #4126. This requires some additional adaptations in the post action as otherwise the invoice won't be generated.
Fixes#4183.