mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-17 06:23:00 +02:00
captive: Verify that the user actually accepted the terms and conditions
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -694,6 +694,7 @@ WARNING: untranslated string: Captive clients
|
||||
WARNING: untranslated string: Captive expiry time
|
||||
WARNING: untranslated string: Captive issued coupons
|
||||
WARNING: untranslated string: Captive logo uploaded
|
||||
WARNING: untranslated string: Captive please accept the terms and conditions
|
||||
WARNING: untranslated string: Captive terms
|
||||
WARNING: untranslated string: Captive terms short
|
||||
WARNING: untranslated string: Captive upload logo
|
||||
|
||||
@@ -639,6 +639,7 @@ WARNING: untranslated string: Captive mac
|
||||
WARNING: untranslated string: Captive menu
|
||||
WARNING: untranslated string: Captive noexpiretime
|
||||
WARNING: untranslated string: Captive nolimit
|
||||
WARNING: untranslated string: Captive please accept the terms and conditions
|
||||
WARNING: untranslated string: Captive terms
|
||||
WARNING: untranslated string: Captive terms short
|
||||
WARNING: untranslated string: Captive title
|
||||
|
||||
@@ -649,6 +649,7 @@ WARNING: untranslated string: Captive mac
|
||||
WARNING: untranslated string: Captive menu
|
||||
WARNING: untranslated string: Captive noexpiretime
|
||||
WARNING: untranslated string: Captive nolimit
|
||||
WARNING: untranslated string: Captive please accept the terms and conditions
|
||||
WARNING: untranslated string: Captive terms
|
||||
WARNING: untranslated string: Captive terms short
|
||||
WARNING: untranslated string: Captive title
|
||||
|
||||
@@ -716,6 +716,7 @@ WARNING: untranslated string: Captive mac
|
||||
WARNING: untranslated string: Captive menu
|
||||
WARNING: untranslated string: Captive noexpiretime
|
||||
WARNING: untranslated string: Captive nolimit
|
||||
WARNING: untranslated string: Captive please accept the terms and conditions
|
||||
WARNING: untranslated string: Captive terms
|
||||
WARNING: untranslated string: Captive terms short
|
||||
WARNING: untranslated string: Captive title
|
||||
|
||||
@@ -712,6 +712,7 @@ WARNING: untranslated string: Captive mac
|
||||
WARNING: untranslated string: Captive menu
|
||||
WARNING: untranslated string: Captive noexpiretime
|
||||
WARNING: untranslated string: Captive nolimit
|
||||
WARNING: untranslated string: Captive please accept the terms and conditions
|
||||
WARNING: untranslated string: Captive terms
|
||||
WARNING: untranslated string: Captive terms short
|
||||
WARNING: untranslated string: Captive title
|
||||
|
||||
@@ -639,6 +639,7 @@ WARNING: untranslated string: Captive mac
|
||||
WARNING: untranslated string: Captive menu
|
||||
WARNING: untranslated string: Captive noexpiretime
|
||||
WARNING: untranslated string: Captive nolimit
|
||||
WARNING: untranslated string: Captive please accept the terms and conditions
|
||||
WARNING: untranslated string: Captive terms
|
||||
WARNING: untranslated string: Captive terms short
|
||||
WARNING: untranslated string: Captive title
|
||||
|
||||
@@ -641,6 +641,7 @@ WARNING: untranslated string: Captive mac
|
||||
WARNING: untranslated string: Captive menu
|
||||
WARNING: untranslated string: Captive noexpiretime
|
||||
WARNING: untranslated string: Captive nolimit
|
||||
WARNING: untranslated string: Captive please accept the terms and conditions
|
||||
WARNING: untranslated string: Captive terms
|
||||
WARNING: untranslated string: Captive terms short
|
||||
WARNING: untranslated string: Captive title
|
||||
|
||||
@@ -724,6 +724,7 @@ WARNING: untranslated string: Captive mac
|
||||
WARNING: untranslated string: Captive menu
|
||||
WARNING: untranslated string: Captive noexpiretime
|
||||
WARNING: untranslated string: Captive nolimit
|
||||
WARNING: untranslated string: Captive please accept the terms and conditions
|
||||
WARNING: untranslated string: Captive terms
|
||||
WARNING: untranslated string: Captive terms short
|
||||
WARNING: untranslated string: Captive title
|
||||
|
||||
@@ -116,15 +116,22 @@ if ($cgiparams{'ACTION'} eq "SUBMIT") {
|
||||
$errormessage = $Lang::tr{"Captive please enter a coupon code"};
|
||||
}
|
||||
|
||||
# License
|
||||
# Terms
|
||||
} else {
|
||||
# Copy session expiry time
|
||||
$clientshash{$key}[3] = $settings{'SESSION_TIME'} || "0";
|
||||
# Make sure that they have been accepted
|
||||
if ($cgiparams{'TERMS'} eq "on") {
|
||||
# Copy session expiry time
|
||||
$clientshash{$key}[3] = $settings{'SESSION_TIME'} || "0";
|
||||
|
||||
# No coupon code
|
||||
$clientshash{$key}[4] = "TERMS";
|
||||
# No coupon code
|
||||
$clientshash{$key}[4] = "TERMS";
|
||||
|
||||
&General::log("Captive", "Internet access granted via license agreement for $ip_address until $clientshash{$key}[3]");
|
||||
&General::log("Captive", "Internet access granted via license agreement for $ip_address until $clientshash{$key}[3]");
|
||||
|
||||
# The terms have not been accepted
|
||||
} else {
|
||||
$errormessage = $Lang::tr{'Captive please accept the terms and conditions'};
|
||||
}
|
||||
}
|
||||
|
||||
# If no errors were found, save configruation and reload
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<TMPL_IF NAME="TERMS">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input class="form-checkbox <TMPL_IF NAME="ERROR">error</TMPL_IF>" type="checkbox">
|
||||
<input class="form-checkbox <TMPL_IF NAME="ERROR">error</TMPL_IF>" type="checkbox" name="TERMS">
|
||||
<TMPL_VAR NAME="L_AGREE_TERMS">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
'Captive noexpiretime' => 'No valid connection time range given',
|
||||
'Captive nolimit' => 'unlimited',
|
||||
'Captive nr' => 'Number',
|
||||
'Captive please accept the terms and conditions' => 'Please accept the terms & conditions',
|
||||
'Captive please enter a coupon code' => 'Please enter a coupon code',
|
||||
'Captive terms' => 'Terms & Conditions',
|
||||
'Captive terms short' => 'T&Cs',
|
||||
|
||||
Reference in New Issue
Block a user