Project

General

Profile

« Previous | Next » 

Revision 3c5d0ab2

Added by Scott Ullrich almost 20 years ago

MFC 6875
Cleanup HTML Move "source port" to where it really belongs, under Target This should be MFC'd to save questions ;)

View differences:

usr/local/www/firewall_nat_out_edit.php
237 237
        case 1: // network
238 238
            document.iform.source.disabled = 0;
239 239
            document.iform.source.disabled = 0;
240
	    document.iform.sourceport.disabled = 0;	    
241 240
            break;
242 241
        default:
243 242
	    document.iform.source.value = "";
244 243
	    document.iform.sourceport.value = "";
245
	    document.iform.sourceport.disabled = 1;    
246 244
            document.iform.source.disabled = 1;
247 245
            document.iform.source_subnet.value = "24";
248 246
            document.iform.source_subnet.disabled = 1;
......
299 297
			</td></tr>
300 298
                        <td>Address:&nbsp;&nbsp;</td>
301 299
                        <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">
302
                          <?php for ($i = 32; $i >= 0; $i--): ?>
303
                          <option value="<?=$i;?>" <?php if ($i == $pconfig['source_subnet']) echo "selected"; ?>>
304
                          <?=$i;?>
305
                          </option>
306
                          <?php endfor; ?>
300
<?php for ($i = 32; $i >= 0; $i--): ?>
301
                          <option value="<?=$i;?>"<?php if ($i == $pconfig['source_subnet']) echo " selected"; ?>><?=$i;?></option>
302
<?php endfor; ?>
307 303
                          </select></td>
308 304
                      </tr>
309 305
                      <tr>
310 306
                        <td>&nbsp;</td>
311 307
                        <td><span class="vexpl">Enter the source network for the outbound NAT mapping.</span></td>
312 308
                      </tr>
313
                      <tr>
314
                        <td>Port:&nbsp;&nbsp;</td>
315
                        <td><input name="sourceport" type="text" class="formfld" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>"></td>
316
                      </tr>
317
                      <tr>
318
                        <td>&nbsp;</td>
319
                        <td><span class="vexpl">Enter the source port for the outbound NAT mapping.</span></td>
320
                      </tr>
321 309
                    </table></td>
322 310
                </tr>
323 311
                <tr>
......
331 319
                      <tr>
332 320
                        <td>Type:&nbsp;&nbsp;</td>
333 321
                        <td><select name="destination_type" class="formfld" onChange="typesel_change()">
334
                            <option value="any" <?php if ($pconfig['destination'] == "any") echo "selected"; ?>>
322
                            <option value="any"<?php if ($pconfig['destination'] == "any") echo " selected"; ?>>
335 323
                            any</option>
336
                            <option value="network" <?php if ($pconfig['destination'] != "any") echo "selected"; ?>>
324
                            <option value="network"<?php if ($pconfig['destination'] != "any") echo " selected"; ?>>
337 325
                            Network</option>
338 326
                          </select></td>
339 327
                      </tr>
......
342 330
                        <td><input name="destination" type="text" class="formfld" id="destination" size="20" value="<?=htmlspecialchars($pconfig['destination']);?>">
343 331
                          /
344 332
                          <select name="destination_subnet" class="formfld" id="destination_subnet">
345
                            <?php for ($i = 32; $i >= 0; $i--): ?>
346
                            <option value="<?=$i;?>" <?php if ($i == $pconfig['destination_subnet']) echo "selected"; ?>>
347
                            <?=$i;?>
348
                            </option>
349
                            <?php endfor; ?>
333
<?php for ($i = 32; $i >= 0; $i--): ?>
334
                            <option value="<?=$i;?>"<?php if ($i == $pconfig['destination_subnet']) echo " selected"; ?>><?=$i;?></option>
335
<?php endfor; ?>
350 336
                          </select> </td>
351 337
                      </tr>
352 338
                      <tr>
......
359 345
                        <td><input name="natport" type="text" class="formfld" id="natport" size="5" value="<?=htmlspecialchars($pconfig['natport']);?>"> (leave blank for any)</td>
360 346
                      </tr>
361 347
                    </table>
348
		  </td>
362 349
                </tr>
363 350
                <tr>
364
                  <td valign="top" class="vncell">Target</td>
365
                  <td class="vtable">
366
			<select name="target" class="formfld">
367
				<option value="" <?php if (!$pconfig['target']) echo "selected"; ?>>Interface address</option>
368
				<?php
369
				if (is_array($config['virtualip']['vip'])):
370
					foreach ($config['virtualip']['vip'] as $sn): ?>
371
						<option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['target']) echo "selected"; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
372
<?php						endforeach;
373
				endif; ?>
374
					<option value="" <?php if($pconfig['target'] == "any") echo "selected"; ?>>any</option>
375
				</select>
376
				<br />
351
                  <td width="22%" valign="top" class="vncell">Target</td>
352
                  <td width="78%" class="vtable">
353
			<table border="0" cellspacing="0" cellpadding="0">
354
			<tr>
355
			  <td>Address:&nbsp;&nbsp;</td>
356
			  <td><select name="target" class="formfld">
357
				<option value=""<?php if (!$pconfig['target']) echo " selected"; ?>>Interface address</option>
358
<?php	if (is_array($config['virtualip']['vip'])):
359
		foreach ($config['virtualip']['vip'] as $sn): ?>
360
				<option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['target']) echo "selected"; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
361
<?php 		endforeach;
362
	endif; ?>
363
				<option value=""<?php if($pconfig['target'] == "any") echo " selected"; ?>>any</option>
364
			  </select>
365
			  </td>
366
			</tr>
367
			<tr><td>&nbsp;</td><td>
377 368
                     <span class="vexpl">Packets matching this rule will be mapped to the IP address given here.<br>
378 369
			If you want this rule to apply to another IP address than the IP address of the interface chosen above,
379 370
			select it here (you need to define <a href="firewall_virtual_ip.php">Virtual IP</a> addresses on the first).
380 371
			 Also note that if you are trying to redirect connections on the LAN select the "any" option.
381
			</span></td>
372
			</span>
373
			</td></tr>
374
			<tr>
375
                          <td>Port:&nbsp;&nbsp;</td>
376
                          <td><input name="sourceport" type="text" class="formfld" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>"></td>
377
			</tr>
378
			<tr><td>&nbsp;</td><td>
379
                        <span class="vexpl">Enter the source port for the outbound NAT mapping.</span>
380
			</td></tr>
381
			</table>
382
		  </td>
382 383
                </tr>
383 384
                <tr>
384 385
                  <td width="22%" valign="top" class="vncell">Description</td>

Also available in: Unified diff