summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_out_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-16 17:36:43 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-16 17:36:43 +0000
commit3c5d0ab2b54c497744a54509fb5d3af227c86fa1 (patch)
treebe23307994d293b8ebd1ab6a45fdd7de8b89ebd8 /usr/local/www/firewall_nat_out_edit.php
parentbe9b63945dd1b7460879452a85e84d34fea158a9 (diff)
downloadpfsense-3c5d0ab2b54c497744a54509fb5d3af227c86fa1.zip
pfsense-3c5d0ab2b54c497744a54509fb5d3af227c86fa1.tar.gz
MFC 6875
Cleanup HTML Move "source port" to where it really belongs, under Target This should be MFC'd to save questions ;)
Diffstat (limited to 'usr/local/www/firewall_nat_out_edit.php')
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php73
1 files changed, 37 insertions, 36 deletions
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index f96d967..21df306 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -237,12 +237,10 @@ function sourcesel_change() {
case 1: // network
document.iform.source.disabled = 0;
document.iform.source.disabled = 0;
- document.iform.sourceport.disabled = 0;
break;
default:
document.iform.source.value = "";
document.iform.sourceport.value = "";
- document.iform.sourceport.disabled = 1;
document.iform.source.disabled = 1;
document.iform.source_subnet.value = "24";
document.iform.source_subnet.disabled = 1;
@@ -299,25 +297,15 @@ function sourcesel_change() {
</td></tr>
<td>Address:&nbsp;&nbsp;</td>
<td><input name="source" type="text" class="formfld" id="source" size="20" value="<?=htmlspecialchars($pconfig['source']);?>">/<select name="source_subnet" class="formfld" id="source_subnet">
- <?php for ($i = 32; $i >= 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['source_subnet']) echo "selected"; ?>>
- <?=$i;?>
- </option>
- <?php endfor; ?>
+<?php for ($i = 32; $i >= 0; $i--): ?>
+ <option value="<?=$i;?>"<?php if ($i == $pconfig['source_subnet']) echo " selected"; ?>><?=$i;?></option>
+<?php endfor; ?>
</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><span class="vexpl">Enter the source network for the outbound NAT mapping.</span></td>
</tr>
- <tr>
- <td>Port:&nbsp;&nbsp;</td>
- <td><input name="sourceport" type="text" class="formfld" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>"></td>
- </tr>
- <tr>
- <td>&nbsp;</td>
- <td><span class="vexpl">Enter the source port for the outbound NAT mapping.</span></td>
- </tr>
</table></td>
</tr>
<tr>
@@ -331,9 +319,9 @@ function sourcesel_change() {
<tr>
<td>Type:&nbsp;&nbsp;</td>
<td><select name="destination_type" class="formfld" onChange="typesel_change()">
- <option value="any" <?php if ($pconfig['destination'] == "any") echo "selected"; ?>>
+ <option value="any"<?php if ($pconfig['destination'] == "any") echo " selected"; ?>>
any</option>
- <option value="network" <?php if ($pconfig['destination'] != "any") echo "selected"; ?>>
+ <option value="network"<?php if ($pconfig['destination'] != "any") echo " selected"; ?>>
Network</option>
</select></td>
</tr>
@@ -342,11 +330,9 @@ function sourcesel_change() {
<td><input name="destination" type="text" class="formfld" id="destination" size="20" value="<?=htmlspecialchars($pconfig['destination']);?>">
/
<select name="destination_subnet" class="formfld" id="destination_subnet">
- <?php for ($i = 32; $i >= 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['destination_subnet']) echo "selected"; ?>>
- <?=$i;?>
- </option>
- <?php endfor; ?>
+<?php for ($i = 32; $i >= 0; $i--): ?>
+ <option value="<?=$i;?>"<?php if ($i == $pconfig['destination_subnet']) echo " selected"; ?>><?=$i;?></option>
+<?php endfor; ?>
</select> </td>
</tr>
<tr>
@@ -359,26 +345,41 @@ function sourcesel_change() {
<td><input name="natport" type="text" class="formfld" id="natport" size="5" value="<?=htmlspecialchars($pconfig['natport']);?>"> (leave blank for any)</td>
</tr>
</table>
+ </td>
</tr>
<tr>
- <td valign="top" class="vncell">Target</td>
- <td class="vtable">
- <select name="target" class="formfld">
- <option value="" <?php if (!$pconfig['target']) echo "selected"; ?>>Interface address</option>
- <?php
- if (is_array($config['virtualip']['vip'])):
- foreach ($config['virtualip']['vip'] as $sn): ?>
- <option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['target']) echo "selected"; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
-<?php endforeach;
- endif; ?>
- <option value="" <?php if($pconfig['target'] == "any") echo "selected"; ?>>any</option>
- </select>
- <br />
+ <td width="22%" valign="top" class="vncell">Target</td>
+ <td width="78%" class="vtable">
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td>Address:&nbsp;&nbsp;</td>
+ <td><select name="target" class="formfld">
+ <option value=""<?php if (!$pconfig['target']) echo " selected"; ?>>Interface address</option>
+<?php if (is_array($config['virtualip']['vip'])):
+ foreach ($config['virtualip']['vip'] as $sn): ?>
+ <option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['target']) echo "selected"; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
+<?php endforeach;
+ endif; ?>
+ <option value=""<?php if($pconfig['target'] == "any") echo " selected"; ?>>any</option>
+ </select>
+ </td>
+ </tr>
+ <tr><td>&nbsp;</td><td>
<span class="vexpl">Packets matching this rule will be mapped to the IP address given here.<br>
If you want this rule to apply to another IP address than the IP address of the interface chosen above,
select it here (you need to define <a href="firewall_virtual_ip.php">Virtual IP</a> addresses on the first).
Also note that if you are trying to redirect connections on the LAN select the "any" option.
- </span></td>
+ </span>
+ </td></tr>
+ <tr>
+ <td>Port:&nbsp;&nbsp;</td>
+ <td><input name="sourceport" type="text" class="formfld" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>"></td>
+ </tr>
+ <tr><td>&nbsp;</td><td>
+ <span class="vexpl">Enter the source port for the outbound NAT mapping.</span>
+ </td></tr>
+ </table>
+ </td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell">Description</td>
OpenPOWER on IntegriCloud