]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
captive: Verify that the user actually accepted the terms and conditions
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 1 May 2017 11:35:45 +0000 (12:35 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Sep 2017 17:56:04 +0000 (18:56 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
doc/language_issues.de
doc/language_issues.es
doc/language_issues.fr
doc/language_issues.it
doc/language_issues.nl
doc/language_issues.pl
doc/language_issues.ru
doc/language_issues.tr
html/cgi-bin/captive/index.cgi
html/html/captive/template.html
langs/en/cgi-bin/en.pl

index 83b2f3606c7ae41a9c483d33b9601d6d87f70b6f..f8cf0da595f57e26a0b4b79f158caf80d555f26f 100644 (file)
@@ -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
index c1e91d838c2d794acd4e2d761aaa313cce0b5764..290dbc00534d640b7157d8139d146850ea4608d2 100644 (file)
@@ -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
index 7384da5496075cd554b6b7d6126a646645793e4c..75424f85ab772964439abf1dfacc8cbac926686b 100644 (file)
@@ -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
index cec9cc4754b97d09356f25c16104d14b267da318..dc64186227949bc3c5503fc7904c1f2566c5d6ce 100644 (file)
@@ -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
index aa4d72d8ba54324999ffd906244ec416de475c68..3284639c1947087f6634e3cba8f850df09125ed8 100644 (file)
@@ -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
index c1e91d838c2d794acd4e2d761aaa313cce0b5764..290dbc00534d640b7157d8139d146850ea4608d2 100644 (file)
@@ -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
index d335c7c1cd183b5a8b1a9c19ae6ed78c62fad600..f88653702a73dd20dcf820421c4c429419db34a4 100644 (file)
@@ -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
index 1309727ac722f0585accfc3fbdb0d3df8d308883..19fd6718c75748d31bf59fbf79ff4978d7a144c3 100644 (file)
@@ -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
index 482ea9016be22118d6263907a34a67ad15f31040..b891255744a946b9b462b3624ad9f21d77848621 100755 (executable)
@@ -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
index ad1c6ce2be7265adf140833abd8e03bf6c74893a..6e39d87dbf18d545d6f51de57d9beda0c61e01e3 100644 (file)
@@ -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>
index f569f53b02f2064a96665d012443606b5f023a07..c0fff16071a53ebc96fa94adddb8d4fe8ccbb8f6 100644 (file)
@@ -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 &amp; conditions',
 'Captive please enter a coupon code' => 'Please enter a coupon code',
 'Captive terms' => 'Terms &amp; Conditions',
 'Captive terms short' => 'T&Cs',