mirror of
https://github.com/pretix/pretix.git
synced 2026-10-21 22:33:43 +00:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03e488ef20 | ||
|
|
619c68e51a | ||
|
|
10c1d5106d | ||
|
|
876566759d |
No files matched your search
@@ -378,7 +378,7 @@ class ItemSerializer(SalesChannelMigrationMixin, I18nAwareModelSerializer):
|
||||
def validate_bundles(self, value):
|
||||
if not self.instance:
|
||||
for b_data in value:
|
||||
ItemBundle.clean_itemvar(self.context['event'], b_data['bundled_item'], b_data['bundled_variation'])
|
||||
ItemBundle.clean_itemvar(self.context['event'], b_data.get('bundled_item'), b_data.get('bundled_variation'))
|
||||
return value
|
||||
|
||||
def validate_addons(self, value):
|
||||
|
||||
@@ -633,6 +633,9 @@ class ImportView(ListView):
|
||||
|
||||
class OrganizerBanktransferView:
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
# Users can use the bank transfer views if they have sufficient permission for at least one event.
|
||||
# Yes, this allows them to cauase changes in events they don't have access to. This is an accepted
|
||||
# risk because every other way, the bank transfer feature becomes basically unusable.
|
||||
has_any_event_perm = request.user.get_events_with_permission(
|
||||
"event.orders:write", request=request
|
||||
).filter(organizer=request.organizer).exists()
|
||||
|
||||
@@ -172,6 +172,9 @@ var pretixstripe = {
|
||||
})
|
||||
|
||||
pretixstripe.affirm.mount('#stripe-affirm')
|
||||
pretixstripe.affirm.on('ready', function () {
|
||||
$('.stripe-container').closest('form').find('.checkout-button-row .btn-primary').prop('disabled', false)
|
||||
})
|
||||
}
|
||||
if ($('#stripe-klarna').length) {
|
||||
try {
|
||||
@@ -183,6 +186,9 @@ var pretixstripe = {
|
||||
})
|
||||
|
||||
pretixstripe.klarna.mount('#stripe-klarna')
|
||||
pretixstripe.klarna.on('ready', function () {
|
||||
$('.stripe-container').closest('form').find('.checkout-button-row .btn-primary').prop('disabled', false)
|
||||
})
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
$('#stripe-klarna').html('<div class=\'alert alert-danger\'>Technical error, please contact support: ' + e + '</div>')
|
||||
|
||||
@@ -20,7 +20,7 @@ function pgettext (context, msgid) {
|
||||
return msgid
|
||||
}
|
||||
|
||||
function interpolate (fmt, object, named) {
|
||||
function interpolate (fmt, obj, named) {
|
||||
if (named) {
|
||||
return fmt.replace(/%\(\w+\)s/g, function (match) { return String(obj[match.slice(2, -2)]) })
|
||||
} else {
|
||||
|
||||
@@ -74,8 +74,6 @@ $panel-default-heading-bg: #e5e5e5 !default;
|
||||
$link-hover-color: var(--pretix-brand-primary-darken-15);
|
||||
|
||||
$btn-default-border: #949494;
|
||||
$btn-default-border-disabled: #ccc !default;
|
||||
$btn-default-bg-disabled: $gray-lighter;
|
||||
|
||||
$btn-primary-border: var(--pretix-brand-primary-darken-5);
|
||||
$btn-primary-border-active: var(--pretix-brand-primary-darken-30);
|
||||
|
||||
@@ -44,10 +44,12 @@ input[type=number]::-webkit-outer-spin-button {
|
||||
box-shadow: 0px 0px 0px 1px $input-border inset;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.btn-default:hover, .btn-default:focus {
|
||||
box-shadow: 0px 0px 0px 1px $input-border inset, inset 0 1px 3px 0 #BFBFBF;
|
||||
background: $btn-default-bg;
|
||||
}
|
||||
|
||||
.btn-default:active, .btn-default:active:hover, .btn-default:active:focus {
|
||||
background: $btn-default-bg;
|
||||
outline: 0;
|
||||
@@ -55,19 +57,6 @@ input[type=number]::-webkit-outer-spin-button {
|
||||
.btn-default.active, .btn-default.active:hover, .btn-default.active:focus {
|
||||
box-shadow: 0px 0px 0px 1px $input-border inset, inset 0 1px 8px 0 #BFBFBF;
|
||||
}
|
||||
.btn-default.disabled, .btn-default[disabled], fieldset[disabled] .btn-default {
|
||||
&, &:hover, &:focus {
|
||||
box-shadow: 0px 0px 0px 1px $btn-default-border-disabled inset, inset 0 1px 3px 0 #d9d9d9;
|
||||
background: $btn-default-bg-disabled;
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-link.disabled, .btn-link[disabled], fieldset[disabled] .btn-link {
|
||||
box-shadow: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
||||
.btn-primary:hover, .btn-primary:focus {
|
||||
box-shadow: inset 0 1px 3px 0 var(--pretix-brand-primary-shade-25);
|
||||
@@ -128,6 +117,16 @@ input[type=number]::-webkit-outer-spin-button {
|
||||
border: transparent;
|
||||
}
|
||||
|
||||
.btn.disabled, .btn[disabled], fieldset[disabled] .btn {
|
||||
box-shadow: 0px 0px 0px 1px #ccc inset, inset 0 1px 3px 0 #d9d9d9;
|
||||
background: #eee;
|
||||
opacity: 0.7;
|
||||
}
|
||||
.btn-link.disabled, .btn-link[disabled], fieldset[disabled] .btn-link {
|
||||
box-shadow: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.btn-group-flex { display: flex; }
|
||||
.btn-group-flex > .btn { flex: 1; }
|
||||
|
||||
|
||||
@@ -1000,7 +1000,6 @@ def test_item_create_with_bundle(token_client, organizer, event, item, category,
|
||||
"bundles": [
|
||||
{
|
||||
"bundled_item": i.pk,
|
||||
"bundled_variation": None,
|
||||
"count": 2,
|
||||
"designated_price": "3.00",
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user