From 0cf04fbe9da4917dd7b76594ee3415f9e4d8a4e2 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 11 Nov 2016 19:13:22 +0100 Subject: [PATCH] captive portal: custom value for quantity --- .../app/views/OPNsense/CaptivePortal/vouchers.volt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/opnsense/mvc/app/views/OPNsense/CaptivePortal/vouchers.volt b/src/opnsense/mvc/app/views/OPNsense/CaptivePortal/vouchers.volt index d6cb4f23e..bede5383f 100644 --- a/src/opnsense/mvc/app/views/OPNsense/CaptivePortal/vouchers.volt +++ b/src/opnsense/mvc/app/views/OPNsense/CaptivePortal/vouchers.volt @@ -296,6 +296,17 @@ POSSIBILITY OF SUCH DAMAGE. $("#voucher-validity-custom").val($(this).val()*60); }); + $("#voucher-quantity").change(function(){ + if ($(this).children(":selected").attr("id") == 'voucher-quantity-custom') { + $("#voucher-quantity-custom-data").show(); + } else { + $("#voucher-quantity-custom-data").hide(); + } + }); + $("#voucher-quantity-custom-data").keyup(function(){ + $("#voucher-quantity-custom").val($(this).val()); + }); + updateVoucherProviders(); $('.selectpicker').selectpicker('refresh'); }); @@ -405,7 +416,9 @@ POSSIBILITY OF SUCH DAMAGE. + +