forked from CGM_Public/pretix_original
Refs #1128 -- Popover on disabled "add to cart" button
This commit is contained in:
@@ -197,7 +197,11 @@ $(function () {
|
||||
}
|
||||
});
|
||||
}
|
||||
$("#btn-add-to-cart").prop("disabled", !is_enabled);
|
||||
if (!is_enabled) {
|
||||
$("#btn-add-to-cart").prop("disabled", !is_enabled).popover({'content': gettext("Please enter a quantity for one of the ticket types."), 'placement': 'top', 'trigger': 'hover focus'});
|
||||
} else {
|
||||
$("#btn-add-to-cart").prop("disabled", false).popover("destroy")
|
||||
}
|
||||
};
|
||||
update_cart_form();
|
||||
$(".product-row input[type=checkbox], .variations input[type=checkbox], .product-row input[type=radio], .variations input[type=radio], .input-item-count").on("change mouseup keyup", update_cart_form);
|
||||
|
||||
Reference in New Issue
Block a user