BUG11505: Captive Portal: no way to remove an uploaded logo

added a delete button

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Alexander Marx
2018-05-24 12:38:39 +02:00
committed by Michael Tremer
parent f809b8d5c7
commit c96146d01e
3 changed files with 10 additions and 1 deletions

View File

@@ -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
}

View File

@@ -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',

View File

@@ -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',