Project

General

Profile

« Previous | Next » 

Revision 3698711f

Added by N0YB over 11 years ago

XHTML Compliance

Interfaces - PPPs Edit

View differences:

usr/local/www/interfaces_ppps_edit.php
419 419
				</select> 
420 420
			</td>
421 421
		</tr>
422
		<tr name="interface" id="interface" >
422
		<tr id="interface" >
423 423
			<td width="22%" valign="top" class="vncellreq"><?= gettext("Link interface(s)"); ?></td>
424 424
			<td width="78%" class="vtable">
425 425
				<select style="vertical-align:top" name="interfaces[]" multiple="multiple" class="formselect" size="4" onchange="show_hide_linkfields(this.options);">
......
429 429
				<br/><span class="vexpl"><?= gettext("Select at least two interfaces for Multilink (MLPPP) connections."); ?></span>
430 430
			</td>
431 431
		</tr>
432
		<tr style="display:none" name="portlists" id="portlists">
432
		<tr style="display:none" id="portlists">
433 433
			<td id="serialports"><?php
434 434
				$selected_ports = explode(',',$pconfig['interfaces']);
435 435
				if (!is_dir("/var/spool/lock"))
......
469 469
				if($serport_count > $port_count)
470 470
					$port_count=$serport_count;
471 471
			?></td>
472
			<td style="display:none" name="port_count" id="port_count"><?=htmlspecialchars($port_count);?></td>
472
			<td style="display:none" id="port_count"><?=htmlspecialchars($port_count);?></td>
473 473
		</tr>
474 474
		<tr>
475 475
			<td width="22%" valign="top" class="vncell"><?= gettext("Description"); ?></td>
......
478 478
				<br/> <span class="vexpl"><?= gettext("You may enter a description here for your reference. Description will appear in the \"Interfaces Assign\" select lists."); ?></span>
479 479
			</td>
480 480
		</tr>	
481
		<tr style="display:none" name="select" id="select"><td style="display:none"></td></tr>
481
		<tr style="display:none" id="select"><td style="display:none"></td></tr>
482 482
		<?php $k=0; ?>
483
		<tr style="display:none" name="ppp_provider" id="ppp_provider">
483
		<tr style="display:none" id="ppp_provider">
484 484
			<td width="22%" valign="top" class="vncell"><?= gettext("Service Provider"); ?></td>
485 485
			<td width="78%" class="vtable">
486 486
				<table border="0" cellpadding="0" cellspacing="0" summary="service provider">
......
495 495
					<tr id="trprovider" style="display:none">
496 496
						<td><?= gettext("Provider:"); ?> &nbsp;&nbsp;</td>
497 497
						<td>
498
							<select class="formselect" name="provider" id="provider" onchange="providerplan_list()">
498
							<select class="formselect" name="provider_list" id="provider_list" onchange="providerplan_list()">
499 499
								<option></option>
500 500
							</select>
501 501
						</td>
......
525 525
			</td>
526 526
		</tr>
527 527

  
528
		<tr style="display:none" name="phone_num" id="phone_num">
528
		<tr style="display:none" id="phone_num">
529 529
			<td width="22%" valign="top" class="vncell"><?= gettext("Phone Number"); ?></td>
530 530
			<td width="78%" class="vtable">
531 531
				<input name="phone" type="text" class="formfld unknown" id="phone" size="40" value="<?=htmlspecialchars($pconfig['phone']);?>" />
532 532
				<br/><span class="vexpl"><?= gettext("Note: Typically *99# for GSM networks and #777 for CDMA networks"); ?></span>
533 533
			</td>
534 534
		</tr>
535
		<tr style="display:none" name="apn_" id="apn_">
535
		<tr style="display:none" id="apn_">
536 536
			<td width="22%" valign="top" class="vncell"><?= gettext("Access Point Name (APN)"); ?></td>
537 537
			<td width="78%" class="vtable">
538 538
				<input name="apn" type="text" class="formfld unknown" id="apn" size="40" value="<?=htmlspecialchars($pconfig['apn']);?>" />
539 539
			</td>
540 540
		</tr>
541 541
		
542
		<tr style="display:none" name="ppp" id="ppp">
542
		<tr style="display:none" id="ppp">
543 543
			<td colspan="2" style="padding:0px;">
544 544
				<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="advanced">		
545
					<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
545
					<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
546 546
						<td width="22%" valign="top" class="vncell"><?= gettext("APN number (optional)"); ?></td>
547 547
						<td width="78%" class="vtable">
548 548
							<input name="apnum" type="text" class="formfld unknown" id="apnum" size="2" value="<?=htmlspecialchars($pconfig['apnum']);?>" />
549 549
							<br/><span class="vexpl"><?= gettext("Note: Defaults to 1 if you set APN above. Ignored if you set no APN above."); ?></span>
550 550
						</td>
551 551
					</tr>
552
					<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
552
					<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
553 553
						<td width="22%" valign="top" class="vncell"><?= gettext("SIM PIN"); ?></td>
554 554
						<td width="78%" class="vtable">
555 555
							<input name="simpin" type="text" class="formfld unknown" id="simpin" size="12" value="<?=htmlspecialchars($pconfig['simpin']);?>" />
556 556
						</td>
557 557
					</tr>
558 558
			
559
					<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
559
					<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
560 560
						<td width="22%" valign="top" class="vncell"><?= gettext("SIM PIN wait"); ?></td>
561 561
						<td width="78%" class="vtable">
562 562
							<input name="pin-wait" type="text" class="formfld unknown" id="pin-wait" size="2" value="<?=htmlspecialchars($pconfig['pin-wait']);?>" />
563 563
							<br/><span class="vexpl"><?= gettext("Note: Time to wait for SIM to discover network after PIN is sent to SIM (seconds)."); ?></span>
564 564
						</td>
565 565
					</tr>
566
					<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
566
					<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
567 567
						<td width="22%" valign="top" class="vncell"><?= gettext("Init String"); ?></td>
568 568
						<td width="78%" class="vtable">
569 569
							<input type="text" size="40" class="formfld unknown" id="initstr" name="initstr" value="<?=htmlspecialchars($pconfig['initstr']);?>" />
......
571 571
							" string at the beginning of the command. Many modern USB 3G modems don't need an initialization string."); ?></span>
572 572
						</td>
573 573
					</tr>
574
					<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
574
					<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
575 575
						<td width="22%" valign="top" class="vncell"><?= gettext("Connection Timeout"); ?></td>
576 576
						<td width="78%" class="vtable">
577 577
							<input name="connect-timeout" type="text" class="formfld unknown" id="connect-timeout" size="2" value="<?=htmlspecialchars($pconfig['connect-timeout']);?>" />
578 578
							<br/><span class="vexpl"><?= gettext("Note: Enter timeout in seconds for connection to be established (sec.) Default is 45 sec."); ?></span>
579 579
						</td>
580 580
					</tr>
581
					<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
581
					<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
582 582
						<td valign="top" class="vncell"><?= gettext("Uptime Logging"); ?></td>
583 583
						<td class="vtable">
584 584
							<input type="checkbox" value="on" id="uptime" name="uptime" <?php if (isset($pconfig['uptime'])) echo "checked=\"checked\""; ?> /> <?= gettext("Enable persistent logging of connection uptime."); ?> 
......
588 588
				</table>
589 589
			</td>
590 590
		</tr>
591
		<tr style="display:none" name="pppoe" id="pppoe">
591
		<tr style="display:none" id="pppoe">
592 592
			<td colspan="2" style="padding:0px;">
593 593
				<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="service name">
594 594
					<tr>
......
598 598
							<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>
599 599
						</td>
600 600
					</tr>
601
					<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
601
					<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
602 602
						<td width="22%" valign="top" class="vncell"><?=gettext("Periodic reset");?></td>
603 603
						<td width="78%" class="vtable">
604 604
							<table id="presetwrap" cellspacing="0" cellpadding="0" width="100%" summary="periodic reset">
......
674 674
			</td>
675 675
		</tr><?php endfor; ?>
676 676

  
677
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
677
		<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
678 678
			<td colspan="2" valign="top" height="16"></td>
679 679
		</tr>
680
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
680
		<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
681 681
			<td colspan="2" valign="top" class="listtopic"><?= gettext("Advanced Options"); ?></td>
682 682
		</tr>
683
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
683
		<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
684 684
		<td valign="top" class="vncell"><?= gettext("Dial On Demand"); ?></td>
685 685
			<td class="vtable">
686 686
				<input type="checkbox" value="on" id="ondemand" name="ondemand" <?php if (isset($pconfig['ondemand'])) echo "checked=\"checked\""; ?> /> <?= gettext("Enable Dial-on-Demand mode"); ?> 
......
688 688
				"The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected."); ?> </span>
689 689
			</td>
690 690
		</tr>
691
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
691
		<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
692 692
			<td valign="top" class="vncell"><?= gettext("Idle Timeout"); ?></td>
693 693
			<td class="vtable">
694 694
				<input name="idletimeout" type="text" class="formfld unknown" id="idletimeout" size="12" value="<?=htmlspecialchars($pconfig['idletimeout']);?>" /> <?= gettext("(seconds) Default is 0, which disables the timeout feature."); ?>
......
696 696
				<br/><?=gettext("When the idle timeout occurs, if the dial-on-demand option is enabled, mpd goes back into dial-on-demand mode. Otherwise, the interface is brought down and all associated routes removed."); ?></span>
697 697
			</td>
698 698
		</tr>
699
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
699
		<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
700 700
			<td width="22%" valign="top" class="vncell"><?= gettext("Compression"); ?></td>
701 701
			<td width="78%" class="vtable">
702 702
				<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)."); ?>
......
705 705
				"stamping or SACK, which modify TCP options between sequential packets.");?></span>
706 706
			</td>
707 707
		</tr>
708
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
708
		<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
709 709
			<td width="22%" valign="top" class="vncell"><?= gettext("TCPmssFix"); ?></td>
710 710
			<td width="78%" class="vtable">
711 711
				<input type="checkbox" value="on" id="tcpmssfix" name="tcpmssfix" <?php if (isset($pconfig['tcpmssfix'])) echo "checked=\"checked\""; ?> />&nbsp;<?= gettext("Disable tcpmssfix (enabled by default)."); ?>
......
716 716
				"gets to discover that it must reduce the fragment size or drop the IP Don't Fragment option from its outgoing data.");?></span>
717 717
			</td>
718 718
		</tr>
719
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
719
		<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
720 720
			<td width="22%" valign="top" class="vncell"><?=gettext("ShortSeq");?></td>
721 721
			<td width="78%" class="vtable">
722 722
				<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 724
				"It is not necessary to disable this for connections that are not multi-link."); ?></span>
725 725
			</td>
726 726
		</tr>
727
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
727
		<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
728 728
			<td width="22%" valign="top" class="vncell"><?=gettext("ACFComp"); ?></td>
729 729
			<td width="78%" class="vtable">
730 730
				<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)."); ?>
731 731
				<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>
732 732
			</td>
733 733
		</tr>
734
		<tr style="display:none" id="advanced_<?=$k;?>" name="advanced_<?=$k;$k++;?>">
734
		<tr style="display:none" id="advanced_<?=$k;?>" <?$k++;?>>
735 735
			<td width="22%" valign="top" class="vncell"><?=gettext("ProtoComp"); ?></td>
736 736
			<td width="78%" class="vtable">
737 737
				<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)."); ?>
738 738
				<br/> <span class="vexpl"><?= gettext("Protocol field compression. This option saves one byte per frame for most frames."); ?></span>
739 739
			</td>
740 740
		</tr>
741
		<tr id="advanced_" name="advanced_">
741
		<tr id="advanced_">
742 742
			<td>&nbsp;</td>
743 743
			<td>
744 744
			<p><input type="button" onclick="show_advanced(1)" value="<?=gettext("Show advanced options"); ?>" /></p>
745 745
			</td>
746
			<td style="display:none" id="adv_rows" name="adv_rows"><?=$k;?></td>
747
			<td style="display:none" id="adv_show" name="adv_show">0</td>
746
			<td style="display:none" id="adv_rows"><?=$k;?></td>
747
			<td style="display:none" id="adv_show">0</td>
748 748
		</tr>
749 749
		<?php for($i=0; $i < $port_count; $i++) : ?>
750 750
		<tr style="display:none" id="link<?=$i;?>">
751 751
			<td width="22%" valign="top" id="linklabel<?=$i;?>" class="vncell"> <?=gettext("Link Parameters");?></td>
752 752
			<td class="vtable">
753
				<table name="link_parameters" border="0" cellpadding="6" cellspacing="0" summary="link parameters">
753
				<table border="0" cellpadding="6" cellspacing="0" summary="link parameters">
754 754
					<tr>
755
						<td width="22%" id="bwlabel<?=$i;?>" valign="top"class="vncell"> <?=gettext("Bandwidth");?></td>
755
						<td width="22%" id="bwlabel<?=$i;?>" valign="top" class="vncell"> <?=gettext("Bandwidth");?></td>
756 756
						<td width="78%" class="vtable">
757 757
						<br/><input name="bandwidth[]" id="bandwidth<?=$i;?>" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['bandwidth'][$i]);?>" />
758 758
						<br/> <span class="vexpl"><?=gettext("Set ONLY for MLPPP connections and ONLY when links have different bandwidths.");?></span>
usr/local/www/javascript/interfaces_ppps_edit/ppps_edit.js
164 164

  
165 165
function country_list() {
166 166
	jQuery('#country option').remove();
167
	jQuery('#provider option').remove();
167
	jQuery('#provider_list option').remove();
168 168
	jQuery('#providerplan option').remove();
169 169
	jQuery('#country').append(new Option('', ''));
170 170
	jQuery.ajax("getserviceproviders.php",{
......
185 185
}
186 186

  
187 187
function providers_list() {
188
	jQuery('#provider option').remove();
188
	jQuery('#provider_list option').remove();
189 189
	jQuery('#providerplan option').remove();
190
	jQuery('#provider').append(new Option('', ''));
190
	jQuery('#provider_list').append(new Option('', ''));
191 191
	jQuery.ajax("getserviceproviders.php",{
192 192
		type: 'POST',
193 193
		data: {country : jQuery('#country').val()},
......
198 198
			for (i = 0; i < responseTextArr.length; i += 1) {
199 199
				value = responseTextArr[i];
200 200
				if (/\S/.test(value)) {
201
					jQuery('#provider').append(new Option(value, value));
201
					jQuery('#provider_list').append(new Option(value, value));
202 202
				}
203 203
			}
204 204
		}
......
212 212
	jQuery('#providerplan').append( new Option('','') );
213 213
	jQuery.ajax("getserviceproviders.php",{
214 214
		type: 'POST',
215
		data: {country : jQuery('#country').val(), provider : jQuery('#provider').val()},
215
		data: {country : jQuery('#country').val(), provider : jQuery('#provider_list').val()},
216 216
		success: function(responseText) {
217 217
			var responseTextArr = responseText.split("\n");
218 218
			var value, providerplan, i;
......
233 233
function prefill_provider() {
234 234
	jQuery.ajax("getserviceproviders.php",{
235 235
		type: "POST",
236
		data: {country : jQuery('#country').val(), provider : jQuery('#provider').val(), plan : jQuery('#providerplan').val()},
236
		data: {country : jQuery('#country').val(), provider : jQuery('#provider_list').val(), plan : jQuery('#providerplan').val()},
237 237
		success: function(responseXML) {
238 238
			var xmldoc = responseXML;
239 239
			var provider = xmldoc.getElementsByTagName('connection')[0];

Also available in: Unified diff