summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@dds.nl>2011-08-24 11:40:14 +0200
committerSeth Mos <seth.mos@dds.nl>2011-08-24 11:40:14 +0200
commitbb5a2d0e727dee7d200d0f84dc76ef0c790e0c00 (patch)
tree6f4a06d224645c3d88dda1d2d00dbd1dacfba830
parent1831a00d46d0cf42f60e1780fc0b147d147c486a (diff)
downloadpfsense-bb5a2d0e727dee7d200d0f84dc76ef0c790e0c00.zip
pfsense-bb5a2d0e727dee7d200d0f84dc76ef0c790e0c00.tar.gz
Automatically adjust the subnet size drop down when editing a entry
Ticket #1661
-rwxr-xr-xusr/local/www/system_routes_edit.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php
index 29be3c4..f881aa3 100755
--- a/usr/local/www/system_routes_edit.php
+++ b/usr/local/www/system_routes_edit.php
@@ -177,8 +177,14 @@ include("head.inc");
<td width="78%" class="vtable">
<input name="network" type="text" class="formfld unknown" id="network" size="20" value="<?=htmlspecialchars($pconfig['network']);?>">
/
- <select name="network_subnet" class="formselect" id="network_subnet">
- <?php for ($i = 128; $i >= 1; $i--): ?>
+ <select name="network_subnet" class="formselect" id="network_subnet"
+ <?php
+ if(is_ipaddrv6($pconfig['network'])) {
+ $size = 128;
+ } else {
+ $size = 32;
+ }
+ for ($i = $size; $i >= 1; $i--): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['network_subnet']) echo "selected"; ?>>
<?=$i;?>
</option>
OpenPOWER on IntegriCloud