Skip to content

Commit

Permalink
Tidy up System:General Setup XHTML
Browse files Browse the repository at this point in the history
Close INPUT tags
Tidy up HTML boolean operators
  • Loading branch information
Colin Fleming committed Mar 7, 2013
1 parent c988ed0 commit 925020e
Showing 1 changed file with 20 additions and 22 deletions.
42 changes: 20 additions & 22 deletions usr/local/www/system.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,17 @@ function is_timezone($elt) {
print_info_box($savemsg);
?>
<form action="system.php" method="post">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="general setup">
<tr>
<td id="mainarea">
<div class="tabcont">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("System"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname"); ?></td>
<td width="78%" class="vtable"> <input name="hostname" type="text" class="formfld unknown" id="hostname" size="40" value="<?=htmlspecialchars($pconfig['hostname']);?>">
<td width="78%" class="vtable"> <input name="hostname" type="text" class="formfld unknown" id="hostname" size="40" value="<?=htmlspecialchars($pconfig['hostname']);?>" />
<br/>
<span class="vexpl">
<?=gettext("Name of the firewall host, without domain part"); ?>
Expand All @@ -267,7 +267,7 @@ function is_timezone($elt) {
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Domain"); ?></td>
<td width="78%" class="vtable"> <input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
<td width="78%" class="vtable"> <input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>" />
<br/>
<span class="vexpl">
<?=gettext("Do not use 'local' as a domain name. It will cause local hosts running mDNS (avahi, bonjour, etc.) to be unable to resolve local hosts not running mDNS."); ?>
Expand All @@ -279,8 +279,8 @@ function is_timezone($elt) {
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("DNS servers"); ?></td>
<td width="78%" class="vtable">
<p>
<table>
<br/>
<table summary="dns servers and gateways">
<tr>
<td><b><?=gettext("DNS Server"); ?></b></td>
<?php if ($multiwan): ?>
Expand All @@ -293,7 +293,7 @@ function is_timezone($elt) {
?>
<tr>
<td>
<input name="dns<?php echo $dnscounter;?>" type="text" class="formfld unknown" id="dns<?php echo $dnscounter;?>" size="28" value="<?php echo $pconfig['dns'.$dnscounter];?>">
<input name="dns<?php echo $dnscounter;?>" type="text" class="formfld unknown" id="dns<?php echo $dnscounter;?>" size="28" value="<?php echo $pconfig['dns'.$dnscounter];?>" />
</td>
<td>
<?php if ($multiwan): ?>
Expand All @@ -302,26 +302,25 @@ function is_timezone($elt) {
$gwname = "none";
$dnsgw = "dns{$dnscounter}gw";
if($pconfig[$dnsgw] == $gwname) {
$selected = "selected";
$selected = "selected=\"selected\"";
} else {
$selected = "";
}
echo "<option value='$gwname' $selected>$gwname</option>\n";
foreach($arr_gateways as $gwname => $gwitem) {
echo $pconfig[$dnsgw];
//echo $pconfig[$dnsgw];
if((is_ipaddrv4(lookup_gateway_ip_by_name($pconfig[$dnsgw])) && (is_ipaddrv6($gwitem['gateway'])))) {
continue;
}
if((is_ipaddrv6(lookup_gateway_ip_by_name($pconfig[$dnsgw])) && (is_ipaddrv4($gwitem['gateway'])))) {
continue;
}
if($pconfig[$dnsgw] == $gwname) {
$selected = "selected";
$selected = "selected=\"selected\"";
} else {
$selected = "";
}
echo "<option value='$gwname' $selected>$gwname - {$gwitem['friendlyiface']} - {$gwitem['gateway']}
</option>\n";
echo "<option value='$gwname' $selected>$gwname - {$gwitem['friendlyiface']} - {$gwitem['gateway']}</option>\n";
}
?>
</select>
Expand All @@ -330,7 +329,7 @@ function is_timezone($elt) {
</tr>
<?php endfor; ?>
</table>
<br>
<br />
<span class="vexpl">
<?=gettext("Enter IP addresses to by used by the system for DNS resolution." .
"These are also used for the DHCP service, DNS forwarder and for PPTP VPN clients."); ?>
Expand All @@ -342,7 +341,7 @@ function is_timezone($elt) {
<br/>
<?php endif; ?>
<br/>
<input name="dnsallowoverride" type="checkbox" id="dnsallowoverride" value="yes" <?php if ($pconfig['dnsallowoverride']) echo "checked"; ?>>
<input name="dnsallowoverride" type="checkbox" id="dnsallowoverride" value="yes" <?php if ($pconfig['dnsallowoverride']) echo "checked=\"checked\""; ?> />
<strong>
<?=gettext("Allow DNS server list to be overridden by DHCP/PPP on WAN"); ?>
</strong>
Expand All @@ -354,15 +353,14 @@ function is_timezone($elt) {
"VPN clients."), $g['product_name']); ?>
<br />
<br />
<input name="dnslocalhost" type="checkbox" id="dnslocalhost" value="yes" <?php if ($pconfig['dnslocalhost']) echo "checked"; ?> />
<input name="dnslocalhost" type="checkbox" id="dnslocalhost" value="yes" <?php if ($pconfig['dnslocalhost']) echo "checked=\"checked\""; ?> />
<strong>
<?=gettext("Do not use the DNS Forwarder as a DNS server for the firewall"); ?>
</strong>
<br />
<?=gettext("By default localhost (127.0.0.1) will be used as the first DNS server where the DNS forwarder is enabled, so system can use the DNS forwarder to perform lookups. ".
"Checking this box omits localhost from the list of DNS servers."); ?>
</span>
</p>
</td>
</tr>
<tr>
Expand All @@ -371,7 +369,7 @@ function is_timezone($elt) {
<select name="timezone" id="timezone">
<?php foreach ($timezonelist as $value): ?>
<?php if(strstr($value, "GMT")) continue; ?>
<option value="<?=htmlspecialchars($value);?>" <?php if ($value == $pconfig['timezone']) echo "selected"; ?>>
<option value="<?=htmlspecialchars($value);?>" <?php if ($value == $pconfig['timezone']) echo "selected=\"selected\""; ?>>
<?=htmlspecialchars($value);?>
</option>
<?php endforeach; ?>
Expand All @@ -386,7 +384,7 @@ function is_timezone($elt) {
<tr>
<td width="22%" valign="top" class="vncell">Time update interval</td>
<td width="78%" class="vtable">
<input name="timeupdateinterval" type="text" class="formfld unknown" id="timeupdateinterval" size="4" value="<?=htmlspecialchars($pconfig['timeupdateinterval']);?>">
<input name="timeupdateinterval" type="text" class="formfld unknown" id="timeupdateinterval" size="4" value="<?=htmlspecialchars($pconfig['timeupdateinterval']);?>" />
<br/>
<span class="vexpl">
Minutes between network time sync. 300 recommended,
Expand All @@ -398,7 +396,7 @@ function is_timezone($elt) {
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("NTP time server"); ?></td>
<td width="78%" class="vtable">
<input name="timeservers" type="text" class="formfld unknown" id="timeservers" size="40" value="<?=htmlspecialchars($pconfig['timeservers']);?>">
<input name="timeservers" type="text" class="formfld unknown" id="timeservers" size="40" value="<?=htmlspecialchars($pconfig['timeservers']);?>" />
<br/>
<span class="vexpl">
<?=gettext("Use a space to separate multiple hosts (only one " .
Expand All @@ -413,7 +411,7 @@ function is_timezone($elt) {
<select name="language">
<?php
foreach(get_locale_list() as $lcode => $ldesc) {
$selected = ' selected';
$selected = ' selected="selected"';
if($lcode != $pconfig['language'])
$selected = '';
echo "<option value=\"{$lcode}\"{$selected}>{$ldesc}</option>";
Expand Down Expand Up @@ -448,7 +446,7 @@ function is_timezone($elt) {
$curtheme = $config['theme'];
$selected = "";
if($f == $curtheme)
$selected = " SELECTED";
$selected = " selected=\"selected\"";
?>
<option <?=$selected;?>><?=$f;?></option>
<?php endforeach; ?>
Expand All @@ -466,7 +464,7 @@ function is_timezone($elt) {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>">
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
</td>
</tr>
</table>
Expand Down

0 comments on commit 925020e

Please sign in to comment.