]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
captive: Import new design
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Apr 2017 11:24:45 +0000 (12:24 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Sep 2017 17:54:45 +0000 (18:54 +0100)
This is the new design of the access page of the captive
portal. It is based on the Bootstrap 4 grid system and
reboot but does not use anything else from it.

It is responsive and customisable.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
18 files changed:
config/rootfiles/common/web-user-interface
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
doc/language_missings
html/cgi-bin/captive/index.cgi
html/html/captive/assets/captive.css
html/html/captive/assets/internet.png [deleted file]
html/html/captive/assets/ipfire.png [new file with mode: 0644]
html/html/captive/template.html
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
lfs/web-user-interface

index b755e6e7bbc3df642dcdee7456f5188702f07cab..3c8f314c3085f2d2b0693b617d62695c37cabfb1 100644 (file)
@@ -93,9 +93,11 @@ srv/web/ipfire/cgi-bin/wirelessclient.cgi
 srv/web/ipfire/cgi-bin/wlanap.cgi
 srv/web/ipfire/html/blob.gif
 #srv/web/ipfire/html/captive/assets
+srv/web/ipfire/html/captive/assets/bootstrap-grid.min.css
+srv/web/ipfire/html/captive/assets/bootstrap-reboot.min.css
 srv/web/ipfire/html/captive/assets/captive.css
 srv/web/ipfire/html/captive/assets/favicon.ico
-srv/web/ipfire/html/captive/assets/internet.png
+srv/web/ipfire/html/captive/assets/ipfire.png
 srv/web/ipfire/html/captive/template.html
 srv/web/ipfire/html/clwarn.cgi
 srv/web/ipfire/html/dial.cgi
index 9abbf97e12b1f3d3e7dfd28f7a564aebff4216e8..8c669afcddf1814b1902fd52b3a5354f86d72570 100644 (file)
@@ -671,6 +671,10 @@ WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
 WARNING: translation string unused: yearly firewallhits
+WARNING: untranslated string: Captive GAIN ACCESS
+WARNING: untranslated string: Captive agree tac
+WARNING: untranslated string: Captive heading tac
+WARNING: untranslated string: Captive heading voucher
 WARNING: untranslated string: Scan for Songs
 WARNING: untranslated string: addons
 WARNING: untranslated string: bytes
index 5008c405247e46ea844ae127d6d1450bae60741f..cb333db5445d30276dde9c6be0cfd187dfadd87b 100644 (file)
@@ -618,19 +618,26 @@ WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
 WARNING: translation string unused: yearly firewallhits
+WARNING: untranslated string: Captive ACTIVATE
+WARNING: untranslated string: Captive GAIN ACCESS
 WARNING: untranslated string: Captive activate
 WARNING: untranslated string: Captive activated
 WARNING: untranslated string: Captive active on
+WARNING: untranslated string: Captive agree tac
 WARNING: untranslated string: Captive auth_lic
 WARNING: untranslated string: Captive auth_vou
 WARNING: untranslated string: Captive authentication
 WARNING: untranslated string: Captive config
 WARNING: untranslated string: Captive err doublevoucher
 WARNING: untranslated string: Captive expire
+WARNING: untranslated string: Captive genvoucher
+WARNING: untranslated string: Captive heading tac
+WARNING: untranslated string: Captive heading voucher
 WARNING: untranslated string: Captive invalid logosize
 WARNING: untranslated string: Captive invalid_voucher
 WARNING: untranslated string: Captive logo_set
 WARNING: untranslated string: Captive logo_upload
+WARNING: untranslated string: Captive logo_upload1
 WARNING: untranslated string: Captive mac
 WARNING: untranslated string: Captive menu
 WARNING: untranslated string: Captive noexpiretime
@@ -638,7 +645,6 @@ WARNING: untranslated string: Captive nolimit
 WARNING: untranslated string: Captive title
 WARNING: untranslated string: Captive voactive
 WARNING: untranslated string: Captive voucher
-WARNING: untranslated string: Captive voucherout
 WARNING: untranslated string: Captive vouchervalid
 WARNING: untranslated string: Captive vout
 WARNING: untranslated string: Captive wrong ext
index 503ad3ed659713244ce331b309ac094fc6a3e5d9..ccf9393218950a3d24204ba03c6b0a1139e61082 100644 (file)
@@ -628,19 +628,26 @@ WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
 WARNING: translation string unused: yearly firewallhits
+WARNING: untranslated string: Captive ACTIVATE
+WARNING: untranslated string: Captive GAIN ACCESS
 WARNING: untranslated string: Captive activate
 WARNING: untranslated string: Captive activated
 WARNING: untranslated string: Captive active on
+WARNING: untranslated string: Captive agree tac
 WARNING: untranslated string: Captive auth_lic
 WARNING: untranslated string: Captive auth_vou
 WARNING: untranslated string: Captive authentication
 WARNING: untranslated string: Captive config
 WARNING: untranslated string: Captive err doublevoucher
 WARNING: untranslated string: Captive expire
+WARNING: untranslated string: Captive genvoucher
+WARNING: untranslated string: Captive heading tac
+WARNING: untranslated string: Captive heading voucher
 WARNING: untranslated string: Captive invalid logosize
 WARNING: untranslated string: Captive invalid_voucher
 WARNING: untranslated string: Captive logo_set
 WARNING: untranslated string: Captive logo_upload
+WARNING: untranslated string: Captive logo_upload1
 WARNING: untranslated string: Captive mac
 WARNING: untranslated string: Captive menu
 WARNING: untranslated string: Captive noexpiretime
@@ -648,7 +655,6 @@ WARNING: untranslated string: Captive nolimit
 WARNING: untranslated string: Captive title
 WARNING: untranslated string: Captive voactive
 WARNING: untranslated string: Captive voucher
-WARNING: untranslated string: Captive voucherout
 WARNING: untranslated string: Captive vouchervalid
 WARNING: untranslated string: Captive vout
 WARNING: untranslated string: Captive wrong ext
index 2de425c2d7f7ec72376bbf62664135757b67815a..e3b59adb5ad38d38d7f7a4e1b0de84f7777ad81e 100644 (file)
@@ -695,19 +695,26 @@ WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
 WARNING: translation string unused: yearly firewallhits
+WARNING: untranslated string: Captive ACTIVATE
+WARNING: untranslated string: Captive GAIN ACCESS
 WARNING: untranslated string: Captive activate
 WARNING: untranslated string: Captive activated
 WARNING: untranslated string: Captive active on
+WARNING: untranslated string: Captive agree tac
 WARNING: untranslated string: Captive auth_lic
 WARNING: untranslated string: Captive auth_vou
 WARNING: untranslated string: Captive authentication
 WARNING: untranslated string: Captive config
 WARNING: untranslated string: Captive err doublevoucher
 WARNING: untranslated string: Captive expire
+WARNING: untranslated string: Captive genvoucher
+WARNING: untranslated string: Captive heading tac
+WARNING: untranslated string: Captive heading voucher
 WARNING: untranslated string: Captive invalid logosize
 WARNING: untranslated string: Captive invalid_voucher
 WARNING: untranslated string: Captive logo_set
 WARNING: untranslated string: Captive logo_upload
+WARNING: untranslated string: Captive logo_upload1
 WARNING: untranslated string: Captive mac
 WARNING: untranslated string: Captive menu
 WARNING: untranslated string: Captive noexpiretime
@@ -715,7 +722,6 @@ WARNING: untranslated string: Captive nolimit
 WARNING: untranslated string: Captive title
 WARNING: untranslated string: Captive voactive
 WARNING: untranslated string: Captive voucher
-WARNING: untranslated string: Captive voucherout
 WARNING: untranslated string: Captive vouchervalid
 WARNING: untranslated string: Captive vout
 WARNING: untranslated string: Captive wrong ext
index f39586dca489f7b59b396e26e482f5ee5a9c2883..595971b77cfa2c079650cdd61139c715de79ccee 100644 (file)
@@ -691,19 +691,26 @@ WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
 WARNING: translation string unused: yearly firewallhits
+WARNING: untranslated string: Captive ACTIVATE
+WARNING: untranslated string: Captive GAIN ACCESS
 WARNING: untranslated string: Captive activate
 WARNING: untranslated string: Captive activated
 WARNING: untranslated string: Captive active on
+WARNING: untranslated string: Captive agree tac
 WARNING: untranslated string: Captive auth_lic
 WARNING: untranslated string: Captive auth_vou
 WARNING: untranslated string: Captive authentication
 WARNING: untranslated string: Captive config
 WARNING: untranslated string: Captive err doublevoucher
 WARNING: untranslated string: Captive expire
+WARNING: untranslated string: Captive genvoucher
+WARNING: untranslated string: Captive heading tac
+WARNING: untranslated string: Captive heading voucher
 WARNING: untranslated string: Captive invalid logosize
 WARNING: untranslated string: Captive invalid_voucher
 WARNING: untranslated string: Captive logo_set
 WARNING: untranslated string: Captive logo_upload
+WARNING: untranslated string: Captive logo_upload1
 WARNING: untranslated string: Captive mac
 WARNING: untranslated string: Captive menu
 WARNING: untranslated string: Captive noexpiretime
@@ -711,7 +718,6 @@ WARNING: untranslated string: Captive nolimit
 WARNING: untranslated string: Captive title
 WARNING: untranslated string: Captive voactive
 WARNING: untranslated string: Captive voucher
-WARNING: untranslated string: Captive voucherout
 WARNING: untranslated string: Captive vouchervalid
 WARNING: untranslated string: Captive vout
 WARNING: untranslated string: Captive wrong ext
index 5008c405247e46ea844ae127d6d1450bae60741f..cb333db5445d30276dde9c6be0cfd187dfadd87b 100644 (file)
@@ -618,19 +618,26 @@ WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
 WARNING: translation string unused: yearly firewallhits
+WARNING: untranslated string: Captive ACTIVATE
+WARNING: untranslated string: Captive GAIN ACCESS
 WARNING: untranslated string: Captive activate
 WARNING: untranslated string: Captive activated
 WARNING: untranslated string: Captive active on
+WARNING: untranslated string: Captive agree tac
 WARNING: untranslated string: Captive auth_lic
 WARNING: untranslated string: Captive auth_vou
 WARNING: untranslated string: Captive authentication
 WARNING: untranslated string: Captive config
 WARNING: untranslated string: Captive err doublevoucher
 WARNING: untranslated string: Captive expire
+WARNING: untranslated string: Captive genvoucher
+WARNING: untranslated string: Captive heading tac
+WARNING: untranslated string: Captive heading voucher
 WARNING: untranslated string: Captive invalid logosize
 WARNING: untranslated string: Captive invalid_voucher
 WARNING: untranslated string: Captive logo_set
 WARNING: untranslated string: Captive logo_upload
+WARNING: untranslated string: Captive logo_upload1
 WARNING: untranslated string: Captive mac
 WARNING: untranslated string: Captive menu
 WARNING: untranslated string: Captive noexpiretime
@@ -638,7 +645,6 @@ WARNING: untranslated string: Captive nolimit
 WARNING: untranslated string: Captive title
 WARNING: untranslated string: Captive voactive
 WARNING: untranslated string: Captive voucher
-WARNING: untranslated string: Captive voucherout
 WARNING: untranslated string: Captive vouchervalid
 WARNING: untranslated string: Captive vout
 WARNING: untranslated string: Captive wrong ext
index fa4146bf1a777c5659319b77a65bd8babc23590c..239c25f31f266d22877854c09530f57305c33c31 100644 (file)
@@ -620,19 +620,26 @@ WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: yearly firewallhits
 WARNING: untranslated string: Add a route
+WARNING: untranslated string: Captive ACTIVATE
+WARNING: untranslated string: Captive GAIN ACCESS
 WARNING: untranslated string: Captive activate
 WARNING: untranslated string: Captive activated
 WARNING: untranslated string: Captive active on
+WARNING: untranslated string: Captive agree tac
 WARNING: untranslated string: Captive auth_lic
 WARNING: untranslated string: Captive auth_vou
 WARNING: untranslated string: Captive authentication
 WARNING: untranslated string: Captive config
 WARNING: untranslated string: Captive err doublevoucher
 WARNING: untranslated string: Captive expire
+WARNING: untranslated string: Captive genvoucher
+WARNING: untranslated string: Captive heading tac
+WARNING: untranslated string: Captive heading voucher
 WARNING: untranslated string: Captive invalid logosize
 WARNING: untranslated string: Captive invalid_voucher
 WARNING: untranslated string: Captive logo_set
 WARNING: untranslated string: Captive logo_upload
+WARNING: untranslated string: Captive logo_upload1
 WARNING: untranslated string: Captive mac
 WARNING: untranslated string: Captive menu
 WARNING: untranslated string: Captive noexpiretime
@@ -640,7 +647,6 @@ WARNING: untranslated string: Captive nolimit
 WARNING: untranslated string: Captive title
 WARNING: untranslated string: Captive voactive
 WARNING: untranslated string: Captive voucher
-WARNING: untranslated string: Captive voucherout
 WARNING: untranslated string: Captive vouchervalid
 WARNING: untranslated string: Captive vout
 WARNING: untranslated string: Captive wrong ext
index b2152225b8d499c3d487bfad2f6cedead297f7b2..a73667834831976342c38a9fe5fc7eaab50a9713 100644 (file)
@@ -703,19 +703,26 @@ WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
 WARNING: translation string unused: yearly firewallhits
+WARNING: untranslated string: Captive ACTIVATE
+WARNING: untranslated string: Captive GAIN ACCESS
 WARNING: untranslated string: Captive activate
 WARNING: untranslated string: Captive activated
 WARNING: untranslated string: Captive active on
+WARNING: untranslated string: Captive agree tac
 WARNING: untranslated string: Captive auth_lic
 WARNING: untranslated string: Captive auth_vou
 WARNING: untranslated string: Captive authentication
 WARNING: untranslated string: Captive config
 WARNING: untranslated string: Captive err doublevoucher
 WARNING: untranslated string: Captive expire
+WARNING: untranslated string: Captive genvoucher
+WARNING: untranslated string: Captive heading tac
+WARNING: untranslated string: Captive heading voucher
 WARNING: untranslated string: Captive invalid logosize
 WARNING: untranslated string: Captive invalid_voucher
 WARNING: untranslated string: Captive logo_set
 WARNING: untranslated string: Captive logo_upload
+WARNING: untranslated string: Captive logo_upload1
 WARNING: untranslated string: Captive mac
 WARNING: untranslated string: Captive menu
 WARNING: untranslated string: Captive noexpiretime
@@ -723,7 +730,6 @@ WARNING: untranslated string: Captive nolimit
 WARNING: untranslated string: Captive title
 WARNING: untranslated string: Captive voactive
 WARNING: untranslated string: Captive voucher
-WARNING: untranslated string: Captive voucherout
 WARNING: untranslated string: Captive vouchervalid
 WARNING: untranslated string: Captive vout
 WARNING: untranslated string: Captive wrong ext
index b51964b451e41150827e1f57bb4b236f11e259f8..44b534c8dd0218eb6d8a8eac2c66ef327b08b905 100644 (file)
@@ -36,6 +36,7 @@
 < Captive 1month
 < Captive 1week
 < Captive activate
+< Captive ACTIVATE
 < Captive activated
 < Captive active on
 < Captive authentication
 < Captive config
 < Captive err doublevoucher
 < Captive expire
+< Captive genvoucher
 < Captive invalid logosize
 < Captive invalid_voucher
 < Captive ip
 < Captive logo_set
 < Captive logo_upload
+< Captive logo_upload1
 < Captive mac
 < Captive menu
 < Captive noexpiretime
@@ -58,7 +61,6 @@
 < Captive title
 < Captive voactive
 < Captive voucher
-< Captive voucherout
 < Captive vouchervalid
 < Captive vout
 < Captive wrong ext
 < Captive 1month
 < Captive 1week
 < Captive activate
+< Captive ACTIVATE
 < Captive activated
 < Captive active on
 < Captive authentication
 < Captive config
 < Captive err doublevoucher
 < Captive expire
+< Captive genvoucher
 < Captive invalid logosize
 < Captive invalid_voucher
 < Captive ip
 < Captive logo_set
 < Captive logo_upload
+< Captive logo_upload1
 < Captive mac
 < Captive menu
 < Captive noexpiretime
 < Captive title
 < Captive voactive
 < Captive voucher
-< Captive voucherout
 < Captive vouchervalid
 < Captive vout
 < Captive wrong ext
 < Captive 1month
 < Captive 1week
 < Captive activate
+< Captive ACTIVATE
 < Captive activated
 < Captive active on
 < Captive authentication
 < Captive config
 < Captive err doublevoucher
 < Captive expire
+< Captive genvoucher
 < Captive invalid logosize
 < Captive invalid_voucher
 < Captive ip
 < Captive logo_set
 < Captive logo_upload
+< Captive logo_upload1
 < Captive mac
 < Captive menu
 < Captive noexpiretime
 < Captive title
 < Captive voactive
 < Captive voucher
-< Captive voucherout
 < Captive vouchervalid
 < Captive vout
 < Captive wrong ext
 < Captive 1month
 < Captive 1week
 < Captive activate
+< Captive ACTIVATE
 < Captive activated
 < Captive active on
 < Captive authentication
 < Captive config
 < Captive err doublevoucher
 < Captive expire
+< Captive genvoucher
 < Captive invalid logosize
 < Captive invalid_voucher
 < Captive ip
 < Captive logo_set
 < Captive logo_upload
+< Captive logo_upload1
 < Captive mac
 < Captive menu
 < Captive noexpiretime
 < Captive title
 < Captive voactive
 < Captive voucher
-< Captive voucherout
 < Captive vouchervalid
 < Captive vout
 < Captive wrong ext
index 71bff37a2912008161bb005268841721922dcece..8067f25d9763638b156cb747d834588ee87cbdf3 100755 (executable)
@@ -142,10 +142,23 @@ my $tmpl = HTML::Template->new(
 
 $tmpl->param(REDIRECT_URL => $url);
 
-$tmpl->param(AUTH  => $settings{'AUTH'});
+# Voucher
+if ($settings{'AUTH'} eq "VOUCHER") {
+       $tmpl->param(VOUCHER  => 1);
+}
+
 $tmpl->param(TITLE => $settings{'TITLE'});
 $tmpl->param(ERROR => $errormessage);
 
+$tmpl->param(TAC => &gettac());
+
+# Some translated strings
+$tmpl->param(L_ACTIVATE        => $Lang::tr{'Captive ACTIVATE'});
+$tmpl->param(L_GAIN_ACCESS     => $Lang::tr{'Captive GAIN ACCESS'});
+$tmpl->param(L_HEADING_TAC     => $Lang::tr{'Captive heading tac'});
+$tmpl->param(L_HEADING_VOUCHER => $Lang::tr{'Captive heading voucher'});
+$tmpl->param(L_AGREE_TAC       => $Lang::tr{'Captive agree tac'});
+
 # Print header
 print "Pragma: no-cache\n";
 print "Cache-control: no-cache\n";
@@ -153,7 +166,7 @@ print "Connection: close\n";
 print "Content-type: text/html\n\n";
 
 # Print rendered template
-print $tmpl->output;
+print $tmpl->output();
 
 sub getcgihash {
        my ($hash, $params) = @_;
@@ -187,11 +200,20 @@ sub getcgihash {
        return;
 }
 
-sub getagb(){
-       open( my $handle, "<:utf8", "/var/ipfire/captive/agb.txt" ) or die("$!");
-               while(<$handle>){
-                       $_ = HTML::Entities::decode_entities($_);
-                       print $_;
-               }
-       close( $handle );
+sub gettac() {
+       my @tac = ();
+
+       open(my $handle, "<:utf8", "/var/ipfire/captive/agb.txt" ) or die("$!");
+       while(<$handle>) {
+               $_ = HTML::Entities::decode_entities($_);
+               push(@tac, $_);
+       }
+       close($handle);
+
+       my $tac = join("\n", @tac);
+
+       # Format paragraphs
+       $tac =~ s/\n\n/<\/p>\n<p>/g;
+
+       return $tac;
 }
index 7e8eac6b3fdb535de8752973eb7daec59bd57c27..e405cc94a4b58da9df69bbfead0f1ceba31b6752 100644 (file)
-h1{
-       font-family: sans-serif;
+body {
+       background-color: #eceff1;
+       color: #263238;
+
+       display: flex;
+       min-height: 100vh;
+       flex-direction: column;
 }
 
-body {
-       height: 100%;
-    background-image: url("internet.png");
-    background-size:     cover;                      /* <------ */
-    background-repeat:   no-repeat;
-    background-position: center center;
+body, input {
+       font-family: "Ubuntu", sans-serif;
+       font-size: 14px;
 }
 
-.title{
-       position: relative;
-       background: #f5f5f5;
-       border: 1px solid #FFF;
-       width: 40em;
-       height: 6em;
-       left: 1em;
-       top: 2em;
-       padding-left: 2em;
-       padding-right: 2em;
-       padding-top: 0,5em;
-       opacity: 0.9;
-       border-radius: 5px;
-       -moz-border-radius: 5px;
-       -webkit-border-radius: 5px;
-       box-shadow: 1px 2px 4px rgba(0,0,0,.4);
-}
-
-.login{
+.content {
+       flex: 1;
+}
+
+.box {
+       margin: 272px 0 48px 0;
+       padding: 0 30px 48px 30px;
+
        position: relative;
-       background: #f5f5f5;
-       border: 1px solid #FFF;
-       width: 40em;
-       left: 1em;
-       top: 2em;
-       margin-top: 0,2em;
-       padding-left: 2em;
-       padding-right: 2em;
-       padding-top: 1em;
-       text-align: left;
-       font-family: sans-serif;
-       border-radius: 5px;
-       -moz-border-radius: 5px;
-       -webkit-border-radius: 5px;
-       box-shadow: 1px 2px 4px rgba(0,0,0,.4);
-}
-
-.agb{
+       display: flex;
+       flex-direction: column;
+       background-color: white;
+
+       border: none;
+       border-radius: 4px;
+       box-shadow:
+               0 19px 38px 0 rgba(0, 0, 0, 0.3),
+               0 15px 12px 0 rgba(0, 0, 0, 0.22);
+}
+
+.box-header {
+       display: flex;
+       align-items: center;
+       justify-content: center;
+       min-height: 128px;
+}
+
+.box-header h1 {
+       font-size: 40px;
+}
+
+@media (min-width: 1200px) {
+       .box-header {
+               min-height: none;
+       }
+
+       .box-header h1 {
+               margin-top: 24px;
+               margin-bottom: 20px;
+       }
+}
+
+.box-block {
+       padding: 24px 16px 24px 16px;
+       margin: 0 -8px 40px -8px;
+
+       text-align: center;
+       background-color: #b71c1c;
+       color: white;
+       border-radius: 4px;
+}
+
+@media (min-width: 1200px) {
+       .box-block {
+               padding: 18px 16px 18px 16px;
+               margin: 0 0 48px 0;
+       }
+}
+
+.box-block h4 {
+       font-size: 20px;
+}
+
+footer {
+       height: 64px;
+       background-color: rgba(84, 110, 122, 0.06); /* #546e7a */
+}
+
+.footer {
+       display: flex;
+       align-items: center;
+}
+
+.footer .logo {
+       width: 64px;
+       height: 64px;
+       padding: 8px;
+}
+
+.form-text {
+       display: inline-block;
+       height: 36px;
+
+       color: #263238;
+       background-color: rgba(38, 49, 56, 0,08);
+
+       border: 0;
+       border-radius: 2px;
+       box-shadow: inset 0 -2px 0 0 #546e7a;
+}
+
+.form-text .error {
+       box-shadow: 0 -2px 0 0 #ff3d00;
+}
+
+.form-submit {
+       display: inline-block;
+
+       font-weight: 500;
+       text-transform: uppercase;
+
+       height: 36px;
+       padding: 0 16px 0 16px;
+       margin: 0 8px 0 8px;
+
+       color: #263238;
+       background-color: white;
+
+       border: none;
+       border-radius: 2px;
+       box-shadow:
+               0 2px 4px 0 rgba(0, 0, 0, 0.16),
+               0 1px 2px 0 rgba(0, 0, 0, 0.23);
+}
+
+.form-submit:hover {
+       box-shadow:
+               0 3px 6px 0 rgba(0, 0, 0, 0.16),
+               0 3px 6px 0 rgba(0, 0, 0, 0.23);
+}
+
+.form-submit:active {
+       background-color: black;
+       opacity: 0.16;
+       box-shadow: none;
+}
+
+.checkbox {
        position: relative;
-       background: #f5f5f5;
-       border: 1px solid #FFF;
-       width: 40em;
-       left: 1em;
-       top: 2em;
-       margin-top: 0,2em;
-       padding-left: 2em;
-       padding-right: 2em;
-       padding-top: 1em;
-       text-align: left;
-       font-family: sans-serif;
-       opacity: 0.9;
-       border-radius: 5px;
-       -moz-border-radius: 5px;
-       -webkit-border-radius: 5px;
-       box-shadow: 1px 2px 4px rgba(0,0,0,.4);
-}
-
-#agbtext{
-       font-size: 12px;
-       font-weight: normal;
-       resize: none;
-       overflow-y: scroll;
+       display: block;
+
+       margin-top: 20px;
 }
 
+.checkbox .form-checkbox {
+       position: absolute;
+       margin-top: 1px;
+       margin-left: -24px;
+
+       width: 20px;
+       height: 20px;
+
+       background-color: rgba(38, 49, 56, 0.08);
+
+       border: 2px solid #546e7a;
+       border-radius: 2px;
+}
diff --git a/html/html/captive/assets/internet.png b/html/html/captive/assets/internet.png
deleted file mode 100644 (file)
index b4f20df..0000000
Binary files a/html/html/captive/assets/internet.png and /dev/null differ
diff --git a/html/html/captive/assets/ipfire.png b/html/html/captive/assets/ipfire.png
new file mode 100644 (file)
index 0000000..cd84ad5
Binary files /dev/null and b/html/html/captive/assets/ipfire.png differ
index 20b79198c241e18dd4a03ab73a49bff8236fe17b..26f4142089b7a8e668a0b1d15dfb3f4bfba01cf6 100644 (file)
@@ -1 +1,72 @@
-TEMPLATE GOES HERE
+<!DOCTYPE HTML>
+<html>
+       <head>
+               <meta charset="UTF-8">
+               <title><TMPL_VAR NAME="TITLE"></title>
+
+               <link rel="stylesheet" href="../assets/bootstrap-reboot.min.css">
+               <link rel="stylesheet" href="../assets/bootstrap-grid.min.css">
+               <link rel="stylesheet" href="../assets/captive.css">
+
+               <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">
+       </head>
+
+       <body>
+               <div class="container content">
+                       <div class="row">
+                               <div class="col-12 col-lg-10 offset-lg-1 col-xl-8 offset-xl-2">
+                                       <div class="box">
+                                               <div class="box-header">
+                                                       <h1><TMPL_VAR NAME="TITLE"></h1>
+                                               </div>
+
+                                               <div class="box-block">
+                                                       <TMPL_IF NAME="VOUCHER">
+                                                               <h4><TMPL_VAR NAME="L_HEADING_VOUCHER"></h4>
+                                                       <TMPL_ELSE>
+                                                               <h4><TMPL_VAR NAME="L_HEADING_TAC"></h4>
+                                                       </TMPL_IF>
+
+                                                       <form action="" method="POST">
+                                                               <input type="hidden" name="url" value="<TMPL_VAR NAME="URL">">
+
+                                                               <TMPL_IF NAME="VOUCHER">
+                                                                               <input class="form-text" type="text" name="VOUCHER">
+                                                                               <input class="form-submit" type="submit"
+                                                                                       value="<TMPL_VAR NAME="L_ACTIVATE">">
+                                                               <TMPL_ELSE>
+                                                                               <input class="form-submit" type="submit"
+                                                                                       value="<TMPL_VAR NAME="L_GAIN_ACCESS">">
+                                                               </TMPL_IF>
+
+                                                               <TMPL_IF NAME="TAC">
+                                                                       <div class="checkbox">
+                                                                               <label>
+                                                                                       <input class="form-checkbox" type="checkbox">
+                                                                                       <TMPL_VAR NAME="L_AGREE_TAC">
+                                                                               </label>
+                                                                       </div>
+                                                               </TMPL_IF>
+                                                       </form>
+                                               </div>
+
+                                               <TMPL_IF NAME="TAC">
+                                                       <TMPL_VAR NAME="TAC">
+                                               </TMPL_IF>
+                                       </div>
+                               </div>
+                       </div>
+               </div>
+
+               <footer>
+                       <div class="container">
+                               <div class="footer">
+                                       <img class="logo" src="../assets/ipfire.png" alt="IPFire Logo">
+                                       Powered by IPFire
+                               </div>
+                       </div>
+               </footer>
+       </body>
+</html>
index a47bc727cf15c907e61b98b5bebb25fc5eb0caba..562000bf80877710b47be888f794720a9da2e42b 100644 (file)
@@ -10,6 +10,7 @@
 'Captive 1day' => '1 Tag',
 'Captive 1month' => '1 Monat',
 'Captive 1week' => '1 Woche',
+'Captive ACTIVATE' => 'AKTIVIEREN',
 'Captive activate' => 'Aktivieren',
 'Captive activated' => 'Aktiviert',
 'Captive active on' => 'Aktiviert auf',
@@ -19,6 +20,7 @@
 'Captive config' => 'Konfiguration',
 'Captive err doublevoucher' => 'Ein Gutschein mit diesem Code ist bereits im Umlauf',
 'Captive expire' => 'Ablauf',
+'Captive genvoucher' => 'Gutschein generieren',
 'Captive invalid logosize' => 'Die hochgeladene Datei entspricht nicht der vorgegeben Auflösung von mindestens 1280x400 und maximal 1920x800 Pixeln',
 'Captive invalid_voucher' => 'Dieser Code ist ungültig. Bitte versuchen Sie es erneut',
 'Captive ip' => 'IP-Addresse',
@@ -33,7 +35,6 @@
 'Captive time' => 'Erlaubter Nutzungszeitraum nach Aktivierung (Stunden)',
 'Captive title' => 'Titel der Anmeldeseite',
 'Captive voactive' => 'Aktive Gutscheine',
-'Captive genvoucher' => 'Gutschein generieren',
 'Captive voucher' => 'Gutschein',
 'Captive vouchervalid' => 'Erlaubter Zeitraum für Gutschein',
 'Captive vout' => 'Ausgegebene Gutscheine',
index 995685fb13567258d6161f7595dd93b2dccddc72..c1409570c25661216e9cbf4f577124df64a4d71b 100644 (file)
 'Captive 1day' => '1 day',
 'Captive 1month' => '1 month',
 'Captive 1week' => '1 week',
+'Captive ACTIVATE' => 'ACTIVATE',
+'Captive GAIN ACCESS' => 'GAIN ACCESS',
 'Captive activate' => 'Activate',
 'Captive activated' => 'Activated',
 'Captive active on' => 'Activated on',
+'Captive agree tac' => 'I agree with the terms & conditions below.',
 'Captive auth_lic' => 'License',
 'Captive auth_vou' => 'Voucher',
 'Captive authentication' => 'Type of Access',
 'Captive config' => 'Settings',
 'Captive err doublevoucher' => 'A voucher with this code already exists',
 'Captive expire' => 'Expire',
+'Captive genvoucher' => 'Generate voucher',
+'Captive heading tac' => 'Terms &amp; Conditions',
+'Captive heading voucher' => 'Voucher or Access Code',
 'Captive invalid logosize' => 'The uploaded image file does not meet the required resolution of at least 1280x400 but not larger than 1920x800 pixels',
 'Captive invalid_voucher' => 'Invalid code. Please try again',
 'Captive ip' => 'IP Address',
@@ -33,7 +39,6 @@
 'Captive time' => 'Access time post activation (hours)',
 'Captive title' => 'Title of Login Page',
 'Captive voactive' => 'Active Vouchers',
-'Captive genvoucher' => 'Generate voucher',
 'Captive voucher' => 'Voucher',
 'Captive vouchervalid' => 'Allowed time for this voucher',
 'Captive vout' => 'Issued Vouchers',
index a8e3e39607bb7dc97f5f24cc8deb0eac7794ae4c..4b01eb721a1f85a15f04b3a61c85ed7207f97f77 100644 (file)
@@ -70,4 +70,11 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
        # Reset permissions of redirect templates and theme directories
        find /srv/web/ipfire/html/{redirect-templates,themes} -type d | xargs chmod -v 755
+
+       # Captive Portal CSS
+       ln -svf --relative /usr/share/bootstrap/css/bootstrap-grid.min.css \
+               /srv/web/ipfire/html/captive/assets/bootstrap-grid.min.css
+       ln -svf --relative /usr/share/bootstrap/css/bootstrap-reboot.min.css \
+               /srv/web/ipfire/html/captive/assets/bootstrap-reboot.min.css
+
        @$(POSTBUILD)