Commit cb0e11bc authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(captive portal) don't try to generate invalid vouchers, closes...

(captive portal) don't try to generate invalid vouchers, closes https://github.com/opnsense/core/issues/1253

Let's keep this simple for now, just don't leave the dialog as long as the input isn't valid yet....

(cherry picked from commit fc39bb33)
parent ab95b402
......@@ -178,7 +178,10 @@ POSSIBILITY OF SUCH DAMAGE.
var voucher_validity = $("#voucher-validity").val();
var voucher_quantity = $("#voucher-quantity").val();
var voucher_groupname = $("#voucher-groupname").val();
if (!$.isNumeric(voucher_validity) || !$.isNumeric(voucher_quantity)) {
// don't try to generate vouchers then validity or quantity are invalid
return;
}
ajaxCall(url="/api/captiveportal/voucher/generateVouchers/" + voucher_provider + "/",
sendData={
'count':voucher_quantity,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment