Commit f47e1c41 authored by Franco Fichtner's avatar Franco Fichtner

captive portal: pretty up for menu merge

We don't have this on master, so this needed a manual adapt.
I'm overwriting the new Captive Portal Menu.xml out of convenience,
this way it's impossible to have both entries in the menu when
using core mount.
parent eee92ab5
......@@ -195,18 +195,6 @@
</LogFiles>
</Firewall>
<Services order="5" cssClass="glyphicon glyphicon-cog">
<CaptivePortal1 VisibleName="Captive Portal Settings" url="/services_captiveportal_zones.php" cssClass="fa fa-paper-plane-o">
<Edit url="/services_captiveportal.php?zone=*"/>
<IP url="/services_captiveportal_ip.php?zone=*"/>
<IP_edit url="/services_captiveportal_ip_edit.php?zone=*"/>
<MAC url="/services_captiveportal_mac.php?zone=*"/>
<MAC_edit url="/services_captiveportal_mac_edit.php?zone=*"/>
<Voucher url="/services_captiveportal_vouchers.php?zone=*"/>
<FileManager url="/services_captiveportal_filemanager.php?zone=*"/>
</CaptivePortal1>
<CaptivePortal2 VisibleName="Captive Portal Status" url="/status_captiveportal.php" cssClass="fa fa-paper-plane-o">
<CaptivePortalDetails url="/status_captiveportal.php?*"/>
</CaptivePortal2>
<DHCP cssClass="fa fa-bullseye">
<Server order="100" url="/services_dhcp.php">
<Tab url="/services_dhcp.php?if=*"/>
......
<menu>
<!-- Plugin Captiveportal menu -->
<Services order="4" cssClass="glyphicon glyphicon-cog">
<CaptivePortal VisibleName="Captive Portal" cssClass="fa fa-paper-plane-o">
<Settings url="/services_captiveportal_zones.php">
<Edit url="/services_captiveportal.php?zone=*"/>
<Edit2 url="/services_captiveportal_zones_edit.php*"/>
<IP url="/services_captiveportal_ip.php?zone=*"/>
<IP_edit url="/services_captiveportal_ip_edit.php?zone=*"/>
<MAC url="/services_captiveportal_mac.php?zone=*"/>
<MAC_edit url="/services_captiveportal_mac_edit.php?zone=*"/>
<Voucher url="/services_captiveportal_vouchers.php?zone=*"/>
<FileManager url="/services_captiveportal_filemanager.php?zone=*"/>
</Settings>
<Status url="/status_captiveportal.php">
<All url="/status_captiveportal.php*"/>
<Voucher url="/status_captiveportal_vouchers.php*"/>
<Rolls url="/status_captiveportal_voucher_rolls.php*"/>
<Test url="/status_captiveportal_test.php*"/>
<Expire url="/status_captiveportal_expire.php*"/>
</Status>
</CaptivePortal>
</Services>
</menu>
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
......@@ -111,12 +112,12 @@ $mac_man = load_mac_manufacturer_table();
<?php if (!empty($cpzone) && isset($config['voucher'][$cpzone]['enable'])): ?>
<?php
$tab_array = array();
$tab_array = array();
$tab_array[] = array(gettext("Active Users"), true, "status_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("Active Vouchers"), false, "status_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("Voucher Rolls"), false, "status_captiveportal_voucher_rolls.php?zone={$cpzone}");
$tab_array[] = array(gettext("Test Vouchers"), false, "status_captiveportal_test.php?zone={$cpzone}");
$tab_array[] = array(gettext("Expire Vouchers"), false, "status_captiveportal_expire.php?zone={$cpzone}");
$tab_array[] = array(gettext("Expire Vouchers"), false, "status_captiveportal_expire.php?zone={$cpzone}");
display_top_tabs($tab_array);
?>
<?php endif; ?>
......@@ -135,8 +136,8 @@ $mac_man = load_mac_manufacturer_table();
</td>
<td class="vncell" width="30%" align="center">
<?php if (count($a_cp) > 1) { ?>
<form action="status_captiveportal.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<select name="zone" class="formselect" onchange="document.form1.submit()">
<form action="status_captiveportal.php" method="post" enctype="multipart/form-data">
<select name="zone" class="formselect" onchange="this.form.submit()">
<option value="">none</option>
<?php foreach ($a_cp as $cpkey => $cp) {
echo "<option value=\"{$cpkey}\" ";
......@@ -148,7 +149,9 @@ $mac_man = load_mac_manufacturer_table();
</select>
<br />
</form>
<?php } else echo $a_cp[$cpzone]['zone']; ?>
<?php } elseif (count($a_cp) == 1) {
echo $a_cp[$cpzone]['zone'];
} ?>
</td>
<td colspan="6" width="50%"></td>
</tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment