]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/captive.cgi
BUG11505: Captive Portal: no way to remove an uploaded logo
[ipfire-2.x.git] / html / cgi-bin / captive.cgi
index b7c42e797e4fb6964f3755679da8287716123740..b33287dd4c8c134b69e9fe08a41105ed27c6fa58 100755 (executable)
@@ -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 <<END;
                <tr>
                        <td>$Lang::tr{'Captive logo uploaded'}</td>
-                       <td>$Lang::tr{'yes'}</td>
+                       <td>
+                               $Lang::tr{'yes'}&nbsp;
+                               <input type='submit' name='ACTION' value="$Lang::tr{'Captive delete logo'}"/>
+                       </td>
                </tr>
 END
 }