Project

General

Profile

« Previous | Next » 

Revision dcdff6fa

Added by Colin Fleming over 12 years ago

Tidy up "system_routes_edit.php" XHTML

Close INPUT, BR and IMG tags and add alt to IMG tags
Update HTML boolean operators
Remove name statements from DIV tags
Add missing end TD, end TR and end FONT tags
Add CDATA sections to SCRIPT tags

View differences:

usr/local/www/system_routes_edit.php
220 220

  
221 221
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
222 222
<script type="text/javascript" src="/javascript/jquery.ipv4v6ify.js"></script>
223
<script type="text/javascript" src="/javascript/autosuggest.js">
224
</script>
225
<script type="text/javascript" src="/javascript/suggestions.js">
226
</script>
223
<script type="text/javascript" src="/javascript/autosuggest.js"></script>
224
<script type="text/javascript" src="/javascript/suggestions.js"></script>
227 225
<?php include("fbegin.inc");?>
228 226
<?php if ($input_errors) print_input_errors($input_errors); ?>
229 227
            <form action="system_routes_edit.php" method="post" name="iform" id="iform">
230
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
228
              <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="system routes edit">
231 229
				<tr>
232 230
					<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit route entry"); ?></td>
233 231
				</tr>	
234 232
                <tr>
235 233
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Destination network"); ?></td>
236 234
                  <td width="78%" class="vtable"> 
237
                    <input name="network" type="text" class="formfldalias ipv4v6" id="network" size="20" value="<?=htmlspecialchars($pconfig['network']);?>"> 
235
                    <input name="network" type="text" class="formfldalias ipv4v6" id="network" size="20" value="<?=htmlspecialchars($pconfig['network']);?>" />
238 236
				  / 
239
                    <select name="network_subnet" class="formselect ipv4v6" id="network_subnet"
237
                    <select name="network_subnet" class="formselect ipv4v6" id="network_subnet">
240 238
                      <?php
241 239
			for ($i = 129; $i >= 1; $i--): ?>
242
                      <option value="<?=$i;?>" <?php if ($i == $pconfig['network_subnet']) echo "selected"; ?>>
240
                      <option value="<?=$i;?>" <?php if ($i == $pconfig['network_subnet']) echo "selected=\"selected\""; ?>>
243 241
                      <?=$i;?>
244 242
                      </option>
245 243
                      <?php endfor; ?>
246 244
                    </select>
247
                    <br> <span class="vexpl"><?=gettext("Destination network for this static route"); ?></span></td>
245
                    <br/><span class="vexpl"><?=gettext("Destination network for this static route"); ?></span></td>
248 246
                </tr>
249 247
                <tr>
250 248
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Gateway"); ?></td>
......
254 252
				foreach ($a_gateways as $gateway) {
255 253
	                      		echo "<option value='{$gateway['name']}' ";
256 254
					if ($gateway['name'] == $pconfig['gateway'])
257
						echo "selected";
255
						echo "selected=\"selected\"";
258 256
	                      		echo ">" . htmlspecialchars($gateway['name']) . " - " . htmlspecialchars($gateway['gateway']) . "</option>\n";
259 257
				}
260 258
			?>
261 259
                    </select> <br />
262 260
			<div id='addgwbox'>
263
				<?=gettext("Choose which gateway this route applies to or"); ?> <a OnClick="show_add_gateway();" href="#"><?=gettext("add a new one.");?></a>
261
				<?=gettext("Choose which gateway this route applies to or"); ?> <a onclick="show_add_gateway();" href="#"><?=gettext("add a new one.");?></a>
264 262
								</div>
265 263
								<div id='notebox'>
266 264
								</div>
267
								<div style="display:none" name ="status" id="status">
265
								<div style="display:none" id="status">
268 266
								</div>								
269
								<div style="display:none" id="addgateway" name="addgateway">
270
									<p> 
271
									<table border="1" style="background:#990000; border-style: none none none none; width:225px;"><tr><td>
272
										<table bgcolor="#990000" cellpadding="1" cellspacing="1">
273
											<tr><td>&nbsp;</td>
267
								<div style="display:none" id="addgateway">
268
									<table border="1" style="background:#990000; border-style: none none none none; width:225px;" summary="add gateway"><tr><td>
269
										<table bgcolor="#990000" cellpadding="1" cellspacing="1" summary="add">
270
											<tr><td>&nbsp;</td></tr>
274 271
											<tr>
275
												<td colspan="2"><center><b><font color="white"><?=gettext("Add new gateway:"); ?></b></center></td>
272
												<td colspan="2" align="center"><b><font color="white"><?=gettext("Add new gateway:"); ?></font></b></td>
276 273
											</tr>
277
											<tr><td>&nbsp;</td>
274
											<tr><td>&nbsp;</td></tr>
278 275
											<tr>
279
												<td width="45%" align="right"><font color="white"><?=gettext("Default gateway:"); ?></td><td><input type="checkbox" id="defaultgw" name="defaultgw"></td>
276
												<td width="45%" align="right"><font color="white"><?=gettext("Default gateway:"); ?></font></td><td><input type="checkbox" id="defaultgw" name="defaultgw" /></td>
280 277
											</tr>												
281 278
											<tr>
282
												<td width="45%" align="right"><font color="white"><?=gettext("Interface:"); ?></td>
279
												<td width="45%" align="right"><font color="white"><?=gettext("Interface:"); ?></font></td>
283 280
												<td><select name="addinterfacegw" id="addinterfacegw">
284 281
												<?php $gwifs = get_configured_interface_with_descr();
285 282
													foreach($gwifs as $fif => $dif)
......
288 285
												</select></td>
289 286
											</tr>
290 287
											<tr>
291
												<td align="right"><font color="white"><?=gettext("Gateway Name:"); ?></td><td><input id="name" name="name" value="GW"></td>
288
												<td align="right"><font color="white"><?=gettext("Gateway Name:"); ?></font></td><td><input id="name" name="name" value="GW" /></td>
292 289
											</tr>
293 290
											<tr>
294
												<td align="right"><font color="white"><?=gettext("Gateway IP:"); ?></td><td><input id="gatewayip" name="gatewayip"></td>
291
												<td align="right"><font color="white"><?=gettext("Gateway IP:"); ?></font></td><td><input id="gatewayip" name="gatewayip" /></td>
295 292
											</tr>
296 293
											<tr>
297
												<td align="right"><font color="white"><?=gettext("Description:"); ?></td><td><input id="gatewaydescr" name="gatewaydescr"></td>
294
												<td align="right"><font color="white"><?=gettext("Description:"); ?></font></td><td><input id="gatewaydescr" name="gatewaydescr" /></td>
298 295
											</tr>
299
											<tr><td>&nbsp;</td>
296
											<tr><td>&nbsp;</td></tr>
300 297
											<tr>
301
												<td colspan="2">
302
													<center>
298
												<td colspan="2" align="center">
303 299
														<div id='savebuttondiv'>
304 300
															<input type="hidden" name="addrtype" id="addrtype" value="IPv4" />
305
															<input id="gwsave" type="Button" value="<?=gettext("Save Gateway"); ?>" onClick='hide_add_gatewaysave();'> 
306
															<input id="gwcancel" type="Button" value="<?=gettext("Cancel"); ?>" onClick='hide_add_gateway();'>
301
															<input id="gwsave" type="button" value="<?=gettext("Save Gateway"); ?>" onclick='hide_add_gatewaysave();' />
302
															<input id="gwcancel" type="button" value="<?=gettext("Cancel"); ?>" onclick='hide_add_gateway();' />
307 303
														</div>
308
													</center>
309 304
												</td>
310 305
											</tr>
311
											<tr><td>&nbsp;</td>
306
											<tr><td>&nbsp;</td></tr>
312 307
										</table>
313 308
										</td></tr></table>
314
									<p/>
315 309
								</div>
316
                </tr>
310
                </td></tr>
317 311
		<tr>
318 312
			<td width="22%" valign="top" class="vncell"><?=gettext("Disabled");?></td>
319 313
			<td width="78%" class="vtable">
320
				<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
314
				<input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked=\"checked\""; ?> />
321 315
				<strong><?=gettext("Disable this static route");?></strong><br />
322 316
				<span class="vexpl"><?=gettext("Set this option to disable this static route without removing it from the list.");?></span>
323 317
			</td>
......
325 319
		<tr>
326 320
                  <td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
327 321
                  <td width="78%" class="vtable"> 
328
                    <input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
329
                    <br> <span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed)."); ?></span></td>
322
                    <input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
323
                    <br/><span class="vexpl"><?=gettext("You may enter a description here for your reference (not parsed)."); ?></span></td>
330 324
                </tr>
331 325
                <tr>
332 326
                  <td width="22%" valign="top">&nbsp;</td>
333 327
                  <td width="78%"> 
334
                    <input id="save" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input id="cancel" type="button" value="<?=gettext("Cancel"); ?>" class="formbtn"  onclick="history.back()">
328
                    <input id="save" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input id="cancel" type="button" value="<?=gettext("Cancel"); ?>" class="formbtn"  onclick="history.back()" />
335 329
                    <?php if (isset($id) && $a_routes[$id]): ?>
336
                    <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
330
                    <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
337 331
                    <?php endif; ?>
338 332
                  </td>
339 333
                </tr>
340 334
              </table>
341 335
</form>
342 336
<script type="text/javascript">
337
//<![CDATA[
343 338
					var gatewayip;
344 339
					var name;
345 340
					function show_add_gateway() {
......
390 385
						optn.value = value;
391 386
						selectbox.append(optn);
392 387
						selectbox.prop('selectedIndex',selectbox.children('option').length-1);
393
						jQuery('#notebox').html("<p/><strong><?=gettext("NOTE:");?></strong> <?php printf(gettext("You can manage Gateways %shere%s."), "<a target='_new' href='system_gateways.php'>", "</a>");?> </strong>");
388
						jQuery('#notebox').html("<p><strong><?=gettext("NOTE:");?><\/strong> <?php printf(gettext("You can manage Gateways %shere%s."), "<a target='_blank' href='system_gateways.php'>", "<\/a>");?> <\/strong><\/p>");
394 389
					}				
395 390
					function report_failure() {
396 391
						alert("<?=gettext("Sorry, we could not create your gateway at this time."); ?>");
......
409 404
					}
410 405
					var addressarray = <?= json_encode(get_alias_list(array("host", "network"))) ?>;
411 406
					var oTextbox1 = new AutoSuggestControl(document.getElementById("network"), new StateSuggestions(addressarray));
412

  
407
//]]>
413 408
				</script>
414 409
<?php include("fend.inc"); ?>
415 410
</body>

Also available in: Unified diff