Project

General

Profile

« Previous | Next » 

Revision 6c156433

Added by N0YB over 11 years ago

XHTML Compliance

Interfaces

View differences:

usr/local/www/interfaces.php
1188 1188
<link href="/javascript/datepicker/css/datepicker.css" rel="stylesheet" type="text/css"/>
1189 1189

  
1190 1190
<script type="text/javascript">
1191
//<![CDATA[
1191 1192
	function updateType(t) {
1192 1193
		switch(t) {
1193 1194
			case "none": {
......
1222 1223
			jQuery('#'+t).show();
1223 1224
	}
1224 1225
	function updateTypeSix(t) {
1226
		if (!isNaN(t[0])) t = '_' + t;
1225 1227
		switch(t) {
1226 1228
			case "none": {
1227
				jQuery('#staticv6, #dhcp6, #6rd, #6to4, #track6, #slaac').hide();
1229
				jQuery('#staticv6, #dhcp6, #_6rd, #_6to4, #track6, #slaac').hide();
1228 1230
				break;
1229 1231
			}
1230 1232
			case "staticv6": {
1231
				jQuery('#none, #dhcp6, #6rd, #6to4, #track6, #slaac').hide();
1233
				jQuery('#none, #dhcp6, #_6rd, #_6to4, #track6, #slaac').hide();
1232 1234
				break;
1233 1235
			}
1234 1236
			case "slaac": {
1235
				jQuery('#none, #staticv6, #6rd, #6to4, #track6, #dhcp6').hide();
1237
				jQuery('#none, #staticv6, #6_rd, #_6to4, #track6, #dhcp6').hide();
1236 1238
				break;
1237 1239
			}
1238 1240
			case "dhcp6": {
1239
				jQuery('#none, #staticv6, #6rd, #6to4, #track6, #slaac').hide();
1241
				jQuery('#none, #staticv6, #_6rd, #_6to4, #track6, #slaac').hide();
1240 1242
				break;
1241 1243
			}
1242
			case "6rd": {
1243
				jQuery('#none, #dhcp6, #staticv6, #6to4, #track6, #slaac').hide();
1244
			case "_6rd": {
1245
				jQuery('#none, #dhcp6, #staticv6, #_6to4, #track6, #slaac').hide();
1244 1246
				break;
1245 1247
			}
1246
			case "6to4": {
1247
				jQuery('#none, #dhcp6, #staticv6, #6rd, #track6, #slaac').hide();
1248
			case "_6to4": {
1249
				jQuery('#none, #dhcp6, #staticv6, #_6rd, #track6, #slaac').hide();
1248 1250
				break;
1249 1251
			}
1250 1252
			case "track6": {
1251
				jQuery('#none, #dhcp6, #staticv6, #6rd, #6to4, #slaac').hide();
1253
				jQuery('#none, #dhcp6, #staticv6, #_6rd, #_6to4, #slaac').hide();
1252 1254
				break;
1253 1255
			}
1254 1256
		}
......
1290 1292
	}
1291 1293
	function country_list() {
1292 1294
		jQuery('#country').children().remove();
1293
		jQuery('#provider').children().remove();
1295
		jQuery('#provider_list').children().remove();
1294 1296
		jQuery('#providerplan').children().remove();
1295 1297
		jQuery.ajax("getserviceproviders.php",{
1296 1298
			success: function(response) {
......
1309 1311
	}
1310 1312

  
1311 1313
	function providers_list() {
1312
		jQuery('#provider').children().remove();
1314
		jQuery('#provider_list').children().remove();
1313 1315
		jQuery('#providerplan').children().remove();
1314 1316
		jQuery.ajax("getserviceproviders.php",{
1315 1317
			type: 'post',
......
1321 1323
					var option = new Element('option');
1322 1324
					option.text = value;
1323 1325
					option.value = value;
1324
					jQuery('#provider').append(option);
1326
					jQuery('#provider_list').append(option);
1325 1327
				});
1326 1328
			}
1327 1329
		});
......
1334 1336
		jQuery('#providerplan').append( new Element('option') );
1335 1337
		jQuery.ajax("getserviceproviders.php",{
1336 1338
			type: 'post',
1337
			data: {country : jQuery('#country').val(), provider : jQuery('#provider').val()},
1339
			data: {country : jQuery('#country').val(), provider : jQuery('#provider_list').val()},
1338 1340
			success: function(response) {
1339 1341
				var responseTextArr = response.split("\n");
1340 1342
				responseTextArr.sort();
......
1356 1358
	function prefill_provider() {
1357 1359
		jQuery.ajax("getserviceproviders.php",{
1358 1360
			type: 'post',
1359
			data: {country : jQuery('#country').val(), provider : jQuery('#provider').val(), plan : jQuery('#providerplan').val()},
1361
			data: {country : jQuery('#country').val(), provider : jQuery('#provider_list').val(), plan : jQuery('#providerplan').val()},
1360 1362
			success: function(data,textStatus,response) {
1361 1363
				var xmldoc = response.responseXML;
1362 1364
				var provider = xmldoc.getElementsByTagName('connection')[0];
......
1377 1379
		});
1378 1380
	}
1379 1381

  
1382
//]]>
1380 1383
</script>
1381 1384
</head>
1382 1385
	<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
......
1403 1406
							</td>
1404 1407
						</tr>
1405 1408
					</table>
1406
					<div style="display:none;" name="allcfg" id="allcfg">
1409
					<div style="display:none;" id="allcfg">
1407 1410
					<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="allcfg">
1408 1411
						<tr>
1409 1412
							<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
......
1519 1522
						<tr>
1520 1523
							<td colspan="2" valign="top" height="16"></td>
1521 1524
						</tr>
1522
						<tr style="display:none;" name="none" id="none"><td style="display:none;"></td></tr>
1523
						<tr style="display:none;" name="staticv4" id="staticv4">
1525
						<tr style="display:none;" id="none"><td style="display:none;"></td></tr>
1526
						<tr style="display:none;" id="staticv4">
1524 1527
							<td colspan="2" style="padding:0px;">
1525 1528
								<a name="gatewaysection"></a>
1526 1529
								<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="staticv4">
......
1574 1577
											</div>
1575 1578
											<div id="status">
1576 1579
											</div>
1577
											<div style="display:none" id="addgateway" name="addgateway">
1580
											<div style="display:none" id="addgateway">
1578 1581
												<p>&nbsp;</p>
1579 1582
												<table border="1" class="addgatewaybox" summary="addgateway">
1580 1583
													<tr>
......
1626 1629
								</table>
1627 1630
							</td>
1628 1631
						</tr>
1629
						<tr style="display:none;" name="staticv6" id="staticv6">
1632
						<tr style="display:none;" id="staticv6">
1630 1633
							<td colspan="2" style="padding:0px;">
1631 1634
								<a name="gatewayv6section"></a>
1632 1635
								<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="staticv6">
......
1680 1683
											</div>
1681 1684
											<div id="statusv6">
1682 1685
											</div>
1683
											<div style="display:none" id="addgatewayv6" name="addgatewayv6">
1686
											<div style="display:none" id="addgatewayv6">
1684 1687
												<p>&nbsp;</p>
1685 1688
												<table border="1" class="addgatewaybox" summary="addgatewayv6">
1686 1689
													<tr>
......
1732 1735
								</table>
1733 1736
							</td>
1734 1737
						</tr>
1735
						<tr style="display:none;" name="dhcp" id="dhcp">
1738
						<tr style="display:none;" id="dhcp">
1736 1739
							<td colspan="2" style="padding: 0px;">
1737 1740
								<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="dhcp">
1738 1741
									<tr>
......
1793 1796
								</table>
1794 1797
							</td>
1795 1798
						</tr>
1796
						<tr style="display:none;" name="dhcp6" id="dhcp6">
1799
						<tr style="display:none;" id="dhcp6">
1797 1800
							<td colspan="2" style="padding: 0px;">
1798 1801
								<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="dhcp6">
1799 1802
									<tr>
......
1860 1863
								</table>
1861 1864
							</td>
1862 1865
						</tr>
1863
						<tr style="display:none;" name="6rd" id="6rd">
1866
						<tr style="display:none;" id="_6rd">
1864 1867
							<td colspan="2" style="padding: 0px;">
1865 1868
								<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="6rd">
1866 1869
									<tr>
......
1904 1907
								</table>
1905 1908
							</td>
1906 1909
						</tr>
1907
						<tr style="display:none;" name="track6" id="track6">
1910
						<tr style="display:none;" id="track6">
1908 1911
							<td colspan="2" style="padding: 0px;">
1909 1912
								<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="track6">
1910 1913
									<tr>
......
1928 1931
														continue;
1929 1932
												}
1930 1933
											}
1934
											$rowIndex = 0;
1931 1935
											foreach($dynv6ifs as $iface => $ifacename) {
1936
												$rowIndex++;
1932 1937
												echo "<option value=\"{$iface}\"";
1933 1938
												if ($iface == $pconfig['track6-interface'])
1934 1939
													echo " selected=\"selected\"";
1935 1940
												echo ">" . htmlspecialchars($ifacename) . "</option>";
1936 1941
											}
1942
											if ($rowIndex == 0)
1943
												echo "<option></option>";
1937 1944
										?>
1938 1945
										</select> <br/>
1939 1946
											<br/>
......
1961 1968
								</table>
1962 1969
							</td>
1963 1970
						</tr>
1964
						<tr style="display:none;" name="ppp" id="ppp">
1971
						<tr style="display:none;" id="ppp">
1965 1972
							<td colspan="2" style="padding: 0px;">
1966 1973
								<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="ppp">
1967 1974
									<tr>
1968 1975
										<td colspan="2" valign="top" class="listtopic"><?=gettext("PPP configuration"); ?></td>
1969 1976
									</tr>
1970
									<tr name="ppp_provider" id="ppp_provider">
1977
									<tr id="ppp_provider">
1971 1978
										<td width="22%" valign="top" class="vncell"><?=gettext("Service Provider"); ?></td>
1972 1979
										<td width="78%" class="vtable">
1973 1980
											<table border="0" cellpadding="0" cellspacing="0" summary="service provider">
......
1982 1989
												<tr id="trprovider" style="display:none">
1983 1990
													<td><?=gettext("Provider:"); ?> &nbsp;&nbsp;</td>
1984 1991
													<td>
1985
														<select class="formselect" name="provider" id="provider" onchange="providerplan_list()">
1992
														<select class="formselect" name="provider_list" id="provider_list" onchange="providerplan_list()">
1986 1993
															<option></option>
1987 1994
														</select>
1988 1995
													</td>
......
2011 2018
										<input name="password" type="password" class="formfld pwd" id="password" size="20" value="<?=htmlspecialchars($pconfig['password']);?>" />
2012 2019
										</td>
2013 2020
									</tr>
2014
									<tr name="phone_num" id="phone_num">
2021
									<tr id="phone_num">
2015 2022
										<td width="22%" valign="top" class="vncellreq"><?=gettext("Phone Number"); ?></td>
2016 2023
										<td width="78%" class="vtable">
2017 2024
											<input name="phone" type="text" class="formfld unknown" id="phone" size="12" value="<?=htmlspecialchars($pconfig['phone']);?>" />
2018 2025
										</td>
2019 2026
									</tr>
2020
									<tr name="apn_" id="apn_">
2027
									<tr id="apn_">
2021 2028
										<td width="22%" valign="top" class="vncell"><?=gettext("Access Point Name (APN)"); ?></td>
2022 2029
										<td width="78%" class="vtable">
2023 2030
											<input name="apn" type="text" class="formfld unknown" id="apn" size="40" value="<?=htmlspecialchars($pconfig['apn']);?>" />
2024 2031
										</td>
2025 2032
									</tr>
2026
									<tr name="interface" id="interface" >
2033
									<tr id="interface" >
2027 2034
										<td width="22%" valign="top" class="vncellreq"><?=gettext("Modem Port"); ?></td>
2028 2035
										<td width="78%" class="vtable">
2029 2036
											<select name="port" id="port" class="formselect">
......
2031 2038
												$portlist = glob("/dev/cua*");
2032 2039
												$modems = glob("/dev/modem*");
2033 2040
												$portlist = array_merge($portlist, $modems);
2041
												$rowIndex = 0;
2034 2042
												foreach ($portlist as $port) {
2035 2043
													if(preg_match("/\.(lock|init)$/", $port))
2036 2044
														continue;
2045
													$rowIndex++;
2037 2046
													echo "<option value=\"".trim($port)."\"";
2038 2047
													if ($pconfig['port'] == $port)
2039 2048
														echo " selected=\"selected\"";
2040 2049
													echo ">{$port}</option>";
2041
												}?>
2050
												}
2051
												if ($rowIndex == 0)
2052
													echo "<option></option>";
2053
											?>
2042 2054
											</select>
2043 2055
										</td>
2044 2056
									</tr>
......
2062 2074
								</table>
2063 2075
							</td>
2064 2076
						</tr>
2065
						<tr style="display:none;" name="pppoe" id="pppoe">
2077
						<tr style="display:none;" id="pppoe">
2066 2078
							<td colspan="2" style="padding:0px;">
2067 2079
								<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="pppoe">
2068 2080
									<tr>
......
2171 2183
								</table>
2172 2184
							</td>
2173 2185
						</tr>
2174
						<tr style="display:none;" name="pptp" id="pptp">
2186
						<tr style="display:none;" id="pptp">
2175 2187
							<td colspan="2" style="padding:0px;">
2176 2188
								<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="pptp">
2177 2189
									<tr>

Also available in: Unified diff