All of our API endpoints that do something in the system do at least two
SQL queries, one for the actual change and one for the log entry. Often
many more. We want all of this to happen in a transaction so we know an
API call was executed or not at all, not half-way.
* store the state of the payment regardless of the state
control.html shows the banner that the payment is in review depending on payment.info
* handle capture ressource
* Update src/pretix/plugins/paypal2/views.py
Co-authored-by: Phin Wolkwitz <wolkwitz@pretix.eu>
* add test
* cleanup logic regarding uninteresting resource_type
* store payment.info during _execute_payment asap
---------
Co-authored-by: Phin Wolkwitz <wolkwitz@pretix.eu>
* initial implementation
* factor out _resolve_base_date
* add js to prevent illegal inputs
* fix tests
* Update src/pretix/base/reldate.py
Co-authored-by: Raphael Michel <michel@pretix.eu>
* Apply suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* move js includes of to fragment_js.html
* add type annotations
* moves logic from RelativeDateWrapper into RelativeDate and adds BaseChoice for configuring which models attributes support which relationship
* fix tests
* test upgrade behaviour
* Apply suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* move reldate.js include in correct file
* add OptionAttrsSelect to allow select options with their own attributes per value
* add a little bit of information to the tests for future reference
* rewrite reldate.js use data-attributes
* general cleanup
* add test for order.subevents cases
* use correct choice format
* remove order.subevent variants
* various cleanup
* Apply suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* remove empty docstrings
* add depreciation warning
* change event listener to pretix:bind-forms
---------
Co-authored-by: Raphael Michel <michel@pretix.eu>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* move payment into pending on PENDING_REVIEW webhook
* mark approved payment as pending
* extend BasePaymentProvider to gate aborting pending payments on a payment per payment basis
* add timeout to paypal after which a pending payment can be canceled
* formatting
* add missing negation
* cleanup abort_pending_allowed methods
* Apply suggestions from code review
Co-authored-by: pajowu <pajowu@pajowu.de>
* check all capture elements
* rename method and change defaults
* remove left over Constant
* flake8 .
---------
Co-authored-by: pajowu <pajowu@pajowu.de>
* Fix safari blocking widget opening error url in new tab (Z#23243124)
* Fix autofocus in vue3 widget
autofocus no longer works as the elements are added dynamically
* fix eslint
* rename v-focus to v-autofocus
---------
Co-authored-by: Richard Schreiber <schreiber@rami.io>
* New CheckoutSession model, created and deleted throught cart lifetime but only used for order-level question answers so far
* Order-level QuestionAnswers (relations to CheckoutSession / Order)
* New container_type field on Question model to specify whether Question belongs to order or orderposition
* Order-level questions are currently experimental, UI is hidden behind feature flag
---------
Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
* Fix sendmail/scheduled-mails placeholders
* Add event_or_subevent to context
* Add placeholders to tests
* fix and improve test
* Revert "fix and improve test"
This reverts commit 874a11e982.
* undo placeholder-tests
* add test
* Fix widget not regenerating
Adds support for use_vite variant to updateassets management command and unifies widget generation code
* Simplify DEBUG-mode handling
* fix should_save if file does not exist
---------
Co-authored-by: Richard Schreiber <schreiber@rami.io>
* Allow to set payment term per sales channel
* Apply suggestion from @luelista
Co-authored-by: luelista <weller@rami.io>
---------
Co-authored-by: luelista <weller@rami.io>
* Do not hide subevent list if filtered list is empty
* Event calendar: Allow to show a message if no events are found
* Apply suggestion from @luelista
Co-authored-by: luelista <weller@rami.io>
* Fix failures on org level
* add aria-hidden if no subevents
* Update src/pretix/base/settings.py
* Update src/pretix/base/settings.py
Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
---------
Co-authored-by: luelista <weller@rami.io>
Co-authored-by: Richard Schreiber <schreiber@rami.io>
Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
setting _required forces the CheckoutFieldRenderer to add the "required" bit to the label.
We only need to remove it from the widget attrs to avoid the html input field validation that would force us to check every single box
* Event calendar: consider events without products "not available" for filtering
Also, drop the help text of the flag that is no longer accurate.
* Update src/pretix/presale/views/organizer.py
Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
---------
Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
* Event index: Add subevent time and name to <title> (Z#23246174)
* Update src/pretix/presale/templates/pretixpresale/event/index.html
Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
---------
Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
* ESlint: Ignore vendored and pre-vue code
* Format pre-vue code with eslint where possible
---------
Co-authored-by: Kara Engelhardt <engelhardt@pretix.eu>
transfer_rotation_to_content (or rather add_transformation/replace_content) do not properly duplicate the contentstream they're modifying. this means that if you pass a pdf-level copy of the same bg_page multiple times, the content will be rotated multiple times but the rotation-property ('/Rotate') will only be changed for the first page
pypdfs docs explicitly say that you should not to add_transformation + merge, but instead use merge_transformed_page, which this now does for everything
* Money representation in templates: Allow more precision
When rendering money in templates, we used to have the following logic:
- When the decimal places fit the currency, render with Babel
- When they don't, e.g. we stored 123.67 JPY, even though there are no
fractional Yens, render without Babel with a custom format, but render
the fractional Yens because we'd rather *show* wrong data and make the
bug obvious than hide it.
However, we only did that up to a prevision of two places, we never
showed more. This is still sufficient for core pretix, but we have
plugins that need to operate in fractional cents. Also, we CAN render
everything through babel for consistent formatting.
There is one **risk**: This might cause weird results on SQLite. Since
SQLite has no concept of precise decimal math, results of in-SQL
computations can sometimes experience floating point errors and show
with A LOT of decimal palces. This used to be invisible since the UI
performed the rounding. With this PR – not any more. We'll need to see
how annoying it is, but it should only affect development mode.
This PR also fixes a bug in tax_rate_format that for some reason did not
do what it was supposed to do, even though I tested it back then, weird.
Might even be a Python version thing?
* Update src/pretix/base/templatetags/money.py
Co-authored-by: pajowu <engelhardt@pretix.eu>
* Apply suggestion from @pajowu
Co-authored-by: pajowu <engelhardt@pretix.eu>
* Fix typing stuff
* Fix precision issue
---------
Co-authored-by: pajowu <engelhardt@pretix.eu>
* Delete PayPal integration v1
Leaving only migrations behind
* Try to fix CI
* Fix tests some more
* Rename more plugin name instances in tests and docs
---------
Co-authored-by: Martin Gross <martin@pc-coholic.de>
* Event header: Fix wrapping of date in h2 header (Z#23245589)
This was already correct if the header was a h1
* Revert "Event header: Fix wrapping of date in h2 header (Z#23245589)"
This reverts commit 3d25316fe3.
* Event header: Remove date directly above other date
This removes the date from the <h2> option used when a header image is
uploaded and the header should still be shown. Rendering the date here
makes little sense, since the infobox with the date is always just a few
lines below. It still makes sense for the <h1> option where it becomes
part of the site header.
* Add API-endpoint for event-meta-properties
* Add new doc-file to index, fix spelling and description
* Fix logentry
* Fix logentry again
* validate and add tests
* add meta_properties from organizer only
* fix choices validation
* filter unknown keys from choices due to django-formsets
* Apply batched suggestions from code review
Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
* add safe-guard normalization to None to to_representation
* Apply batched suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* update tests to check for error-messages as well
* fix flake8
* fix permission tests
* Make ObjectListField more flexibel for re-use
* fix validation result
* Improve validation
* Change to I18nField for validation
* update MetaPropertyDictField
* fix docs for i18n strings
* make label_child configurable if MetaPropertyDictField should contain non-localized stuff
* undo test changes in events test
* fix flake8
* Apply batched suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* improve code formatting
---------
Co-authored-by: Richard Schreiber <schreiber@rami.io>
Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* Use fragment_product_list in voucher redemption view (Z#23246929)
* Formatting
* Fix usage in templates
* Review comments
* handle form prefix in fragment_product_list.html
---------
Co-authored-by: Raphael Michel <michel@pretix.eu>
* Fix crash on too old time machine date (Z#23245824)
dateutil.parser seems to reject dates with second-precision timezone-offsets, which datetime produces for some dates aroung the year 200. datetime.fromisoformat has no problem parsing them
* Review comments
* Add min date
* Plugin List: Apply searchfilter if prefilled by browser
Browsers often prefill the form fields, e.g. with their old content when reloading or going back from the previous page. However these filters were not applied until you changed one of the form fields
* Fix linting errors in plugins.js
* Apply review suggestions
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
transfer_rotation_to_content (or rather add_transformation/replace_content) do not properly duplicate the contentstream they're modifying. this means that if you pass a pdf-level copy of the same bg_page multiple times, the content will be rotated multiple times but the rotation-property ('/Rotate') will only be changed for the first page pypdfs docs explicitly say that you should not to add_transformation + merge, but instead use merge_transformed_page, which this now does for everything