mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
captive: Allow selecting highlight colour in web interface
To be able to customise the access page, we now allow the user to select a brand colour. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -73,6 +73,7 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}"){
|
||||
$settings{'AUTH'} = $cgiparams{'AUTH'};
|
||||
$settings{'TITLE'} = $cgiparams{'TITLE'};
|
||||
$settings{'UNLIMITED'} = $cgiparams{'UNLIMITED'};
|
||||
$settings{'COLOR'} = $cgiparams{'COLOR'};
|
||||
|
||||
if (!$errormessage){
|
||||
#Check if we need to upload a new logo
|
||||
@@ -311,6 +312,13 @@ END
|
||||
print"<td><br>$Lang::tr{'no'}</td></tr>";
|
||||
}
|
||||
print<<END
|
||||
<tr>
|
||||
<td>$Lang::tr{'Captive brand color'}</td>
|
||||
<td>
|
||||
<input type="color" name="COLOR" value="$settings{'COLOR'}">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
|
||||
@@ -148,6 +148,7 @@ if ($settings{'AUTH'} eq "VOUCHER") {
|
||||
}
|
||||
|
||||
$tmpl->param(TITLE => $settings{'TITLE'});
|
||||
$tmpl->param(COLOR => $settings{'COLOR'});
|
||||
$tmpl->param(ERROR => $errormessage);
|
||||
|
||||
$tmpl->param(TAC => &gettac());
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
<link rel="stylesheet" href="../assets/bootstrap-grid.min.css">
|
||||
<link rel="stylesheet" href="../assets/captive.css">
|
||||
|
||||
<TMPL_IF NAME="COLOR">
|
||||
<style>
|
||||
.box-block {
|
||||
background-color: <TMPL_VAR NAME="COLOR">;
|
||||
}
|
||||
</style>
|
||||
</TMPL_IF>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500" rel="stylesheet">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
Reference in New Issue
Block a user