From c96146d01ea11cde01ca1e2c1368b57730fb7f1b Mon Sep 17 00:00:00 2001 From: Alexander Marx Date: Thu, 24 May 2018 12:38:39 +0200 Subject: [PATCH] BUG11505: Captive Portal: no way to remove an uploaded logo added a delete button Signed-off-by: Alexander Marx Signed-off-by: Michael Tremer --- html/cgi-bin/captive.cgi | 9 ++++++++- langs/de/cgi-bin/de.pl | 1 + langs/en/cgi-bin/en.pl | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/captive.cgi b/html/cgi-bin/captive.cgi index b7c42e797e..b33287dd4c 100755 --- a/html/cgi-bin/captive.cgi +++ b/html/cgi-bin/captive.cgi @@ -142,6 +142,10 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'save'}) { } } +if ($cgiparams{'ACTION'} eq "$Lang::tr{'Captive delete logo'}") { + unlink $logo; +} + if ($cgiparams{'ACTION'} eq "$Lang::tr{'Captive generate coupons'}") { #check valid remark if ($cgiparams{'REMARK'} ne '' && !&validremark($cgiparams{'REMARK'})){ @@ -381,7 +385,10 @@ if (-e $logo) { print < $Lang::tr{'Captive logo uploaded'} - $Lang::tr{'yes'} + + $Lang::tr{'yes'}  + + END } diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index ba7771ab68..0603e71356 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -28,6 +28,7 @@ 'Captive clients' => 'Clients', 'Captive config' => 'Konfiguration', 'Captive coupon' => 'Gutschein', +'Captive delete logo' => 'Logo löschen', 'Captive err doublevoucher' => 'Ein Gutschein mit diesem Code ist bereits im Umlauf', 'Captive expire' => 'Ablauf', 'Captive expiry time' => 'Ablaufzeit', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 8dbd134339..6e4f855cb4 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -27,6 +27,7 @@ 'Captive client session expiry time' => 'Session Expiry Time', 'Captive config' => 'Settings', 'Captive coupon' => 'Coupon', +'Captive delete logo' => 'Delete Logo', 'Captive err doublevoucher' => 'A coupon with this code already exists', 'Captive expire' => 'Expire', 'Captive expiry time' => 'Expiry Time', -- 2.39.2