Refs #1128 -- Popover on disabled "add to cart" button

This commit is contained in:
Raphael Michel
2019-05-01 13:28:00 +02:00
parent 6841a30d8f
commit e9a340d9ca

View File

@@ -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);