diff --git a/src/pretix/static/pretixpresale/js/widget/widget.js b/src/pretix/static/pretixpresale/js/widget/widget.js
index 4cb77c7eb..e35f28b29 100644
--- a/src/pretix/static/pretixpresale/js/widget/widget.js
+++ b/src/pretix/static/pretixpresale/js/widget/widget.js
@@ -848,10 +848,10 @@ var shared_iframe_fragment = (
);
var shared_alert_fragment = (
- '
'
+ '
'
+ '
'
+ ''
@@ -996,7 +996,7 @@ Vue.component('pretix-widget-event-form', {
// Form start
+ ''
- + ''
@@ -1064,18 +1064,10 @@ Vue.component('pretix-widget-event-form', {
+ ''
),
- data: function () {
- return {
- buy_disabled: true
- }
- },
mounted: function() {
- this.$root.$on('amounts_changed', this.calculate_buy_disabled)
this.$root.$on('focus_voucher_field', this.focus_voucher_field)
- this.calculate_buy_disabled()
},
beforeDestroy: function() {
- this.$root.$off('amounts_changed', this.calculate_buy_disabled)
this.$root.$off('focus_voucher_field', this.focus_voucher_field)
},
computed: {
@@ -1151,28 +1143,6 @@ Vue.component('pretix-widget-event-form', {
$el.focus();
});
},
- calculate_buy_disabled: function() {
- var i, j, k;
- for (i = 0; i < this.$root.categories.length; i++) {
- var cat = this.$root.categories[i];
- for (j = 0; j < cat.items.length; j++) {
- var item = cat.items[j];
- if (item.has_variations) {
- for (k = 0; k < item.variations.length; k++) {
- var v = item.variations[k];
- if (v.amount_selected) {
- this.buy_disabled = false;
- return;
- }
- }
- } else if (item.amount_selected) {
- this.buy_disabled = false;
- return;
- }
- }
- }
- this.buy_disabled = true;
- }
}
});