From 85630abc33444b9268f68f712092fcce3e90c278 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 1 Feb 2016 09:48:32 +0100 Subject: [PATCH] (captive portal) fix multiple voucher generation, closes https://github.com/opnsense/core/issues/728 --- .../mvc/app/views/OPNsense/CaptivePortal/vouchers.volt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/opnsense/mvc/app/views/OPNsense/CaptivePortal/vouchers.volt b/src/opnsense/mvc/app/views/OPNsense/CaptivePortal/vouchers.volt index a5bd78d86..be0a44854 100644 --- a/src/opnsense/mvc/app/views/OPNsense/CaptivePortal/vouchers.volt +++ b/src/opnsense/mvc/app/views/OPNsense/CaptivePortal/vouchers.volt @@ -195,6 +195,10 @@ POSSIBILITY OF SUCH DAMAGE. }); // generate download link and send data to the client + if ($('#downloadFile').length) { + // remove previous link + $('#downloadFile').remove(); + } $('') .attr('id','downloadFile') .attr('href','data:text/csv;charset=utf8,' + encodeURIComponent(output_data))