Vouchers: Don't allow to generate more than 100k random codes at once

This commit is contained in:
Raphael Michel
2023-07-10 15:11:49 +02:00
parent 8a9f14db03
commit f4203b7408
3 changed files with 5 additions and 1 deletions

View File

@@ -123,6 +123,8 @@ var form_handlers = function (el) {
// Vouchers
el.find("#voucher-bulk-codes-generate").click(function () {
if (!$("#voucher-bulk-codes-num").get(0).reportValidity())
return;
var num = $("#voucher-bulk-codes-num").val();
var prefix = $('#voucher-bulk-codes-prefix').val();
if (num != "") {