Project

General

Profile

« Previous | Next » 

Revision a0608cbd

Added by Colin Fleming over 12 years ago

Tidy up "interfaces_pps_edit.php" XHTML

Update HTML Boolean operators
Add summary to TABLE tags
Add missing opening and closing cell tags in TR tag
Remove duplicate opening TR tag

View differences:

usr/local/www/interfaces_ppps_edit.php
400 400
<?php include("fbegin.inc"); ?>
401 401
<?php if ($input_errors) print_input_errors($input_errors); ?>
402 402
	<form action="interfaces_ppps_edit.php" method="post" name="iform" id="iform">
403
	  <table id="interfacetable" width="100%" border="0" cellpadding="6" cellspacing="0">
403
	  <table id="interfacetable" width="100%" border="0" cellpadding="6" cellspacing="0" summary="interfaces ppps edit">
404 404
		<tr>
405 405
			<td colspan="2" valign="top" class="listtopic"><?= gettext("PPPs configuration"); ?></td>
406 406
		</tr>
407 407
		<tr>
408 408
			<td valign="middle" class="vncell"><strong><?= gettext("Link Type"); ?></strong></td>
409 409
			<td class="vtable"> 
410
				<select name="type" onChange="updateType(this.value);" class="formselect" id="type">
410
				<select name="type" onchange="updateType(this.value);" class="formselect" id="type">
411 411
				<?php 
412 412
					foreach ($types as $key => $opt) { 
413
						echo "<option onClick=\"updateType('{$key}');\"";
413
						echo "<option onclick=\"updateType('{$key}');\"";
414 414
						if ($key == $pconfig['type']) 
415
							echo " selected";
415
							echo " selected=\"selected\"";
416 416
						echo " value=\"{$key}\" >" . htmlspecialchars($opt) . "</option>";
417 417
					} 
418 418
				?>
......
422 422
		<tr name="interface" id="interface" >
423 423
			<td width="22%" valign="top" class="vncellreq"><?= gettext("Link interface(s)"); ?></td>
424 424
			<td width="78%" class="vtable">
425
				<select valign="top" name="interfaces[]" multiple="true" class="formselect" size="4" onChange="show_hide_linkfields(this.options);">
425
				<select style="vertical-align:top" name="interfaces[]" multiple="multiple" class="formselect" size="4" onchange="show_hide_linkfields(this.options);">
426 426
					<option></option>
427 427
				</select>
428 428

  
......
477 477
				<br/> <span class="vexpl"><?= gettext("You may enter a description here for your reference. Description will appear in the \"Interfaces Assign\" select lists."); ?></span>
478 478
			</td>
479 479
		</tr>	
480
		<tr style="display:none" name="select" id="select"></tr>
481
		
480
		<tr style="display:none" name="select" id="select"><td style="display:none"></td></tr>
482 481
		<?php $k=0; ?>
483
		
484 482
		<tr style="display:none" name="ppp_provider" id="ppp_provider">
485 483
			<td width="22%" valign="top" class="vncell"><?= gettext("Service Provider"); ?></td>
486 484
			<td width="78%" class="vtable">
487
				<table border="0" cellpadding="0" cellspacing="0">
485
				<table border="0" cellpadding="0" cellspacing="0" summary="service provider">
488 486
					<tr id="trcountry" style="display:none">
489 487
						<td><?= gettext("Country:"); ?> &nbsp;&nbsp;</td>
490 488
						<td>
491
							<select class="formselect" name="country" id="country" onChange="providers_list()">
489
							<select class="formselect" name="country" id="country" onchange="providers_list()">
492 490
								<option></option>
493 491
							</select>
494 492
						</td>
......
496 494
					<tr id="trprovider" style="display:none">
497 495
						<td><?= gettext("Provider:"); ?> &nbsp;&nbsp;</td>
498 496
						<td>
499
							<select class="formselect" name="provider" id="provider" onChange="providerplan_list()">
497
							<select class="formselect" name="provider" id="provider" onchange="providerplan_list()">
500 498
								<option></option>
501 499
							</select>
502 500
						</td>
......
504 502
					<tr id="trproviderplan" style="display:none">
505 503
						<td><?= gettext("Plan:"); ?> &nbsp;&nbsp;</td>
506 504
						<td>
507
							<select class="formselect" name="providerplan" id="providerplan" onChange="prefill_provider()">
505
							<select class="formselect" name="providerplan" id="providerplan" onchange="prefill_provider()">
508 506
								<option></option>
509 507
							</select>
510 508
						</td>
......
542 540
		
543 541
		<tr style="display:none" name="ppp" id="ppp">
544 542
			<td colspan="2" style="padding:0px;">
545
				<table width="100%" border="0" cellpadding="6" cellspacing="0">		
543
				<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="advanced">		
546 544
					<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
547 545
						<td width="22%" valign="top" class="vncell"><?= gettext("APN number (optional)"); ?></td>
548 546
						<td width="78%" class="vtable">
......
582 580
					<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
583 581
						<td valign="top" class="vncell"><?= gettext("Uptime Logging"); ?></td>
584 582
						<td class="vtable">
585
							<input type="checkbox" value="on" id="uptime" name="uptime" <?php if (isset($pconfig['uptime'])) echo "checked"; ?> /> <?= gettext("Enable persistent logging of connection uptime."); ?> 
583
							<input type="checkbox" value="on" id="uptime" name="uptime" <?php if (isset($pconfig['uptime'])) echo "checked=\"checked\""; ?> /> <?= gettext("Enable persistent logging of connection uptime."); ?> 
586 584
							<br/> <span class="vexpl"><?= gettext("This option causes cumulative uptime to be recorded and displayed on the Status Interfaces page."); ?></span>
587 585
						</td>
588 586
					</tr>
......
591 589
		</tr>
592 590
		<tr style="display:none" name="pppoe" id="pppoe">
593 591
			<td colspan="2" style="padding:0px;">
594
				<table width="100%" border="0" cellpadding="6" cellspacing="0">
592
				<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="service name">
595 593
					<tr>
596 594
						<td width="22%" valign="top" class="vncell"><?= gettext("Service name"); ?></td>
597 595
						<td width="78%" class="vtable"><input name="provider" type="text" class="formfld unknown" id="provider" size="20" value="<?=htmlspecialchars($pconfig['provider']);?>" />&nbsp;&nbsp;
598
						<input type="checkbox" value="on" id="null_service" name="null_service" <?php if (isset($pconfig['null_service'])) echo "checked"; ?> /> <?= gettext("Configure a NULL Service name"); ?> 
596
						<input type="checkbox" value="on" id="null_service" name="null_service" <?php if (isset($pconfig['null_service'])) echo "checked=\"checked\""; ?> /> <?= gettext("Configure a NULL Service name"); ?> 
599 597
							<br/> <span class="vexpl"><?= gettext("Hint: this field can usually be left empty. Service name will not be configured if this field is empty. Check the \"Configure NULL\" box to configure a blank Service name."); ?></span>
600 598
						</td>
601 599
					</tr>
602 600
					<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
603 601
						<td width="22%" valign="top" class="vncell"><?=gettext("Periodic reset");?></td>
604 602
						<td width="78%" class="vtable">
605
							<table id="presetwrap" cellspacing="0" cellpadding="0" width="100%">
603
							<table id="presetwrap" cellspacing="0" cellpadding="0" width="100%" summary="periodic reset">
606 604
								<tr>
607 605
									<td align="left" valign="top">
608 606
										<p style="margin: 4px; padding: 4px 0 4px 0; width: 94%;">
609
										<select valign="top" id="reset_type" name="pppoe-reset-type" class="formselect" onChange="show_reset_settings(this.value);">
607
										<select style="vertical-align:top" id="reset_type" name="pppoe-reset-type" class="formselect" onchange="show_reset_settings(this.value);">
610 608
											<option value = ""><?= gettext("Disabled"); ?></option>
611
											<option value="custom" <?php if ($pconfig['pppoe-reset-type'] == "custom") echo "selected"; ?>><?= gettext("Custom"); ?></option>
612
											<option value="preset" <?php if ($pconfig['pppoe-reset-type'] == "preset") echo "selected"; ?>><?= gettext("Pre-Set"); ?></option>
609
											<option value="custom" <?php if ($pconfig['pppoe-reset-type'] == "custom") echo "selected=\"selected\""; ?>><?= gettext("Custom"); ?></option>
610
											<option value="preset" <?php if ($pconfig['pppoe-reset-type'] == "preset") echo "selected=\"selected\""; ?>><?= gettext("Pre-Set"); ?></option>
613 611
										</select> <?= gettext("Select a reset timing type"); ?>
614 612
										</p>
615 613
										<?php if ($pconfig['pppoe_pr_custom']): ?>
......
660 658
			<td width="78%" class="vtable"> 
661 659
				<input name="localip[]" type="text" class="formfld unknown" id="localip<?=$j;?>" size="20"  value="<?=htmlspecialchars($pconfig['localip'][$j]);?>" />
662 660
				/
663
				<select name="subnet[]" class="formselect" id="subnet<?=$j;?>" disabled="true">
661
				<select name="subnet[]" class="formselect" id="subnet<?=$j;?>" disabled="disabled">
664 662
				<?php for ($i = 31; $i > 0; $i--): ?>
665
					<option value="<?=$i;?>"<?php if ($i == $pconfig['subnet'][$j]) echo " selected"; ?>><?=$i;?></option>
663
					<option value="<?=$i;?>"<?php if ($i == $pconfig['subnet'][$j]) echo " selected=\"selected\""; ?>><?=$i;?></option>
666 664
				<?php endfor; ?>
667 665
				</select> <?= gettext("IP Address"); ?>
668 666
				
......
684 682
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
685 683
		<td valign="top" class="vncell"><?= gettext("Dial On Demand"); ?></td>
686 684
			<td class="vtable">
687
				<input type="checkbox" value="on" id="ondemand" name="ondemand" <?php if (isset($pconfig['ondemand'])) echo "checked"; ?> /> <?= gettext("Enable Dial-on-Demand mode"); ?> 
685
				<input type="checkbox" value="on" id="ondemand" name="ondemand" <?php if (isset($pconfig['ondemand'])) echo "checked=\"checked\""; ?> /> <?= gettext("Enable Dial-on-Demand mode"); ?> 
688 686
				<br/> <span class="vexpl"><?= gettext("This option causes the interface to operate in dial-on-demand mode. Do NOT enable if you want your link to be always up. " .  
689 687
				"The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected."); ?> </span>
690 688
			</td>
......
700 698
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
701 699
			<td width="22%" valign="top" class="vncell"><?= gettext("Compression"); ?></td>
702 700
			<td width="78%" class="vtable">
703
				<input type="checkbox" value="on" id="vjcomp" name="vjcomp" <?php if (isset($pconfig['vjcomp'])) echo "checked"; ?> />&nbsp;<?= gettext("Disable vjcomp(compression) (auto-negotiated by default)."); ?>
701
				<input type="checkbox" value="on" id="vjcomp" name="vjcomp" <?php if (isset($pconfig['vjcomp'])) echo "checked=\"checked\""; ?> />&nbsp;<?= gettext("Disable vjcomp(compression) (auto-negotiated by default)."); ?>
704 702
				<br/> <span class="vexpl"><?=gettext("This option enables Van Jacobson TCP header compression, which saves several bytes per TCP data packet. " .
705 703
				"You almost always want this option. This compression ineffective for TCP connections with enabled modern extensions like time " .
706 704
				"stamping or SACK, which modify TCP options between sequential packets.");?></span>
......
709 707
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
710 708
			<td width="22%" valign="top" class="vncell"><?= gettext("TCPmssFix"); ?></td>
711 709
			<td width="78%" class="vtable">
712
				<input type="checkbox" value="on" id="tcpmssfix" name="tcpmssfix" <?php if (isset($pconfig['tcpmssfix'])) echo "checked"; ?> />&nbsp;<?= gettext("Disable tcpmssfix (enabled by default)."); ?>
710
				<input type="checkbox" value="on" id="tcpmssfix" name="tcpmssfix" <?php if (isset($pconfig['tcpmssfix'])) echo "checked=\"checked\""; ?> />&nbsp;<?= gettext("Disable tcpmssfix (enabled by default)."); ?>
713 711
				<br/> <span class="vexpl"><?=gettext("This option causes mpd to adjust incoming and outgoing TCP SYN segments so that the requested maximum segment size is not greater than the amount ". 
714 712
				"allowed by the interface MTU. This is necessary in many setups to avoid problems caused by routers that drop ICMP Datagram Too Big messages. Without these messages, ".
715 713
				"the originating machine sends data, it passes the rogue router then hits a machine that has an MTU that is not big enough for the data. Because the IP Don't Fragment option is set, ".
......
720 718
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
721 719
			<td width="22%" valign="top" class="vncell"><?=gettext("ShortSeq");?></td>
722 720
			<td width="78%" class="vtable">
723
				<input type="checkbox" value="on" id="shortseq" name="shortseq" <?php if (isset($pconfig['shortseq'])) echo "checked"; ?> />&nbsp;<?= gettext("Disable shortseq (auto-negotiated by default)."); ?>
721
				<input type="checkbox" value="on" id="shortseq" name="shortseq" <?php if (isset($pconfig['shortseq'])) echo "checked=\"checked\""; ?> />&nbsp;<?= gettext("Disable shortseq (auto-negotiated by default)."); ?>
724 722
				<br/> <span class="vexpl"><?= gettext("This option is only meaningful if multi-link PPP is negotiated. It proscribes shorter multi-link fragment headers, saving two bytes on every frame. " .
725 723
				"It is not necessary to disable this for connections that are not multi-link."); ?></span>
726 724
			</td>
......
728 726
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
729 727
			<td width="22%" valign="top" class="vncell"><?=gettext("ACFComp"); ?></td>
730 728
			<td width="78%" class="vtable">
731
				<input type="checkbox" value="on" id="acfcomp" name="acfcomp" <?php if (isset($pconfig['acfcomp'])) echo "checked"; ?> />&nbsp;<?= gettext("Disable acfcomp (compression) (auto-negotiated by default)."); ?>
729
				<input type="checkbox" value="on" id="acfcomp" name="acfcomp" <?php if (isset($pconfig['acfcomp'])) echo "checked=\"checked\""; ?> />&nbsp;<?= gettext("Disable acfcomp (compression) (auto-negotiated by default)."); ?>
732 730
				<br/> <span class="vexpl"><?= gettext("Address and control field compression. This option only applies to asynchronous link types. It saves two bytes per frame."); ?></span>
733 731
			</td>
734 732
		</tr>
735 733
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
736 734
			<td width="22%" valign="top" class="vncell"><?=gettext("ProtoComp"); ?></td>
737 735
			<td width="78%" class="vtable">
738
				<input type="checkbox" value="on" id="protocomp" name="protocomp" <?php if (isset($pconfig['protocomp'])) echo "checked"; ?> />&nbsp;<?= gettext("Disable protocomp (compression) (auto-negotiated by default)."); ?>
736
				<input type="checkbox" value="on" id="protocomp" name="protocomp" <?php if (isset($pconfig['protocomp'])) echo "checked=\"checked\""; ?> />&nbsp;<?= gettext("Disable protocomp (compression) (auto-negotiated by default)."); ?>
739 737
				<br/> <span class="vexpl"><?= gettext("Protocol field compression. This option saves one byte per frame for most frames."); ?></span>
740 738
			</td>
741 739
		</tr>
742 740
		<tr id="advanced_" name="advanced_">
743 741
			<td>&nbsp;</td>
744 742
			<td>
745
			<p><input type="button" onClick="show_advanced(1)" value="<?=gettext("Show advanced options"); ?>" /></p>
743
			<p><input type="button" onclick="show_advanced(1)" value="<?=gettext("Show advanced options"); ?>" /></p>
746 744
			</td>
747 745
			<td style="display:none" id="adv_rows" name="adv_rows"><?=$k;?></td>
748 746
			<td style="display:none" id="adv_show" name="adv_show">0</td>
749 747
		</tr>
750
		<tr>
751 748
		<?php for($i=0; $i < $port_count; $i++) : ?>
752 749
		<tr style="display:none" id="link<?=$i;?>">
753 750
			<td width="22%" valign="top" id="linklabel<?=$i;?>" class="vncell"> <?=gettext("Link Parameters");?></td>
754 751
			<td class="vtable">
755
				<table name="link_parameters" border="0" cellpadding="6" cellspacing="0">
752
				<table name="link_parameters" border="0" cellpadding="6" cellspacing="0" summary="link parameters">
756 753
					<tr>
757 754
						<td width="22%" id="bwlabel<?=$i;?>" valign="top"class="vncell"> <?=gettext("Bandwidth");?></td>
758 755
						<td width="78%" class="vtable">

Also available in: Unified diff