diff options
author | Colin Fleming <cj_fleming@sky.com> | 2014-04-04 17:25:41 +0100 |
---|---|---|
committer | Colin Fleming <cj_fleming@sky.com> | 2014-04-04 17:25:41 +0100 |
commit | 180db1862788c9614f90d6d19bdf0bc7ba04ce94 (patch) | |
tree | 2c62e6a21173ad909bbe58fe2ab7f9c9aa4fe49e /usr/local/www/services_dhcp_edit.php | |
parent | a4b1bf88bbdc0b05f39c5dcca245ccf3f0563f7d (diff) | |
download | pfsense-180db1862788c9614f90d6d19bdf0bc7ba04ce94.zip pfsense-180db1862788c9614f90d6d19bdf0bc7ba04ce94.tar.gz |
Tidy up "services_dhcp" XHTML
Update alert message
Add "closehead" variable and manually close HEAD
Add CDATA sections to scripts
Add summart to tables
Update HTML Boolean operators
Close INPUT
Add missing closing P tag
Remove empty TFOOT
Add missing opening TR tag, closing TD tag and closing P tag
Remove duplicate closing TR
Diffstat (limited to 'usr/local/www/services_dhcp_edit.php')
-rw-r--r-- | usr/local/www/services_dhcp_edit.php | 77 |
1 files changed, 41 insertions, 36 deletions
diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php index a609f04..b38d023 100644 --- a/usr/local/www/services_dhcp_edit.php +++ b/usr/local/www/services_dhcp_edit.php @@ -320,6 +320,7 @@ if ($_POST) { } } +$closehead = false; $pgtitle = array(gettext("Services"),gettext("DHCP"),gettext("Edit static mapping")); $shortcut_section = "dhcp"; @@ -328,6 +329,7 @@ include("head.inc"); ?> <script type="text/javascript"> +//<![CDATA[ function show_ddns_config() { document.getElementById("showddnsbox").innerHTML=''; aodiv = document.getElementById('showddns'); @@ -345,39 +347,42 @@ include("head.inc"); aodiv = document.getElementById('showtftp'); aodiv.style.display = "block"; } +//]]> </script> +</head> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> <?php if ($input_errors) print_input_errors($input_errors); ?> <form action="services_dhcp_edit.php" method="post" name="iform" id="iform"> - <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0"> + <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0" summary="static mapping"> <tr> <td colspan="2" valign="top" class="listtopic"><?=gettext("Static DHCP Mapping");?></td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("MAC address");?></td> <td width="78%" class="vtable"> - <input name="mac" type="text" class="formfld unknown" id="mac" size="30" value="<?=htmlspecialchars($pconfig['mac']);?>"> + <input name="mac" type="text" class="formfld unknown" id="mac" size="30" value="<?=htmlspecialchars($pconfig['mac']);?>" /> <?php $ip = getenv('REMOTE_ADDR'); $mac = `/usr/sbin/arp -an | grep {$ip} | cut -d" " -f4`; $mac = str_replace("\n","",$mac); ?> - <a OnClick="document.forms[0].mac.value='<?=$mac?>';" href="#"><?=gettext("Copy my MAC address");?></a> + <a onclick="document.forms[0].mac.value='<?=$mac?>';" href="#"><?=gettext("Copy my MAC address");?></a> <br /> <span class="vexpl"><?=gettext("Enter a MAC address in the following format: ". "xx:xx:xx:xx:xx:xx");?></span></td> </tr> + <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Client identifier");?></td> <td width="78%" class="vtable"> - <input name="cid" type="text" class="formfld unknown" id="cid" size="30" value="<?=htmlspecialchars($pconfig['cid']);?>"> - <span class="vexpl"><?=gettext("");?></span></td> + <input name="cid" type="text" class="formfld unknown" id="cid" size="30" value="<?=htmlspecialchars($pconfig['cid']);?>" /> + </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("IP address");?></td> <td width="78%" class="vtable"> - <input name="ipaddr" type="text" class="formfld unknown" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>"> + <input name="ipaddr" type="text" class="formfld unknown" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>" /> <br /> <?=gettext("If an IPv4 address is entered, the address must be outside of the pool.");?> <br /> @@ -387,77 +392,77 @@ include("head.inc"); <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Hostname");?></td> <td width="78%" class="vtable"> - <input name="hostname" type="text" class="formfld unknown" id="hostname" size="20" value="<?=htmlspecialchars($pconfig['hostname']);?>"> + <input name="hostname" type="text" class="formfld unknown" id="hostname" size="20" value="<?=htmlspecialchars($pconfig['hostname']);?>" /> <br /> <span class="vexpl"><?=gettext("Name of the host, without domain part.");?></span></td> </tr> <?php if($netboot_enabled) { ?> <tr> <td width="22%" valign="top" class="vncell">Netboot Filename</td> <td width="78%" class="vtable"> - <input name="filename" type="text" class="formfld unknown" id="filename" size="20" value="<?=htmlspecialchars($pconfig['filename']);?>"> + <input name="filename" type="text" class="formfld unknown" id="filename" size="20" value="<?=htmlspecialchars($pconfig['filename']);?>" /> <br /> <span class="vexpl">Name of the file that should be loaded when this host boots off of the network, overrides setting on main page.</span></td> </tr> <tr> <td width="22%" valign="top" class="vncell">Root Path</td> <td width="78%" class="vtable"> - <input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>"> + <input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>" /> <br /> <span class="vexpl"><?=gettext("Enter the"); ?> <b><?=gettext("root-path"); ?></b>-<?=gettext("string");?>, overrides setting on main page.</span></td> </tr> <?php } ?> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td> <td width="78%" class="vtable"> - <input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>"> + <input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" /> <br /> <span class="vexpl"><?=gettext("You may enter a description here ". "for your reference (not parsed).");?></span></td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("ARP Table Static Entry");?></td> <td width="78%" class="vtable"> - <input name="arp_table_static_entry" id="arp_table_static_entry" type="checkbox" value="yes" <?php if ($pconfig['arp_table_static_entry']) echo "checked"; ?>> - <br /> <span class="vexpl"><?=gettext("Create an ARP Table Static Entry for this MAC & IP Address pair. ". + <input name="arp_table_static_entry" id="arp_table_static_entry" type="checkbox" value="yes" <?php if ($pconfig['arp_table_static_entry']) echo "checked=\"checked\""; ?> /> + <br /> <span class="vexpl"><?=gettext("Create an ARP Table Static Entry for this MAC & IP Address pair. ". "");?></span></td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("WINS servers");?></td> <td width="78%" class="vtable"> - <input name="wins1" type="text" class="formfld unknown" id="wins1" size="20" value="<?=htmlspecialchars($pconfig['wins1']);?>"><br /> - <input name="wins2" type="text" class="formfld unknown" id="wins2" size="20" value="<?=htmlspecialchars($pconfig['wins2']);?>"> + <input name="wins1" type="text" class="formfld unknown" id="wins1" size="20" value="<?=htmlspecialchars($pconfig['wins1']);?>" /><br /> + <input name="wins2" type="text" class="formfld unknown" id="wins2" size="20" value="<?=htmlspecialchars($pconfig['wins2']);?>" /> </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td> <td width="78%" class="vtable"> - <input name="dns1" type="text" class="formfld unknown" id="dns1" size="20" value="<?=htmlspecialchars($pconfig['dns1']);?>"><br /> - <input name="dns2" type="text" class="formfld unknown" id="dns2" size="20" value="<?=htmlspecialchars($pconfig['dns2']);?>"><br /> + <input name="dns1" type="text" class="formfld unknown" id="dns1" size="20" value="<?=htmlspecialchars($pconfig['dns1']);?>" /><br /> + <input name="dns2" type="text" class="formfld unknown" id="dns2" size="20" value="<?=htmlspecialchars($pconfig['dns2']);?>" /><br /> <?=gettext("NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.");?> </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Gateway");?></td> <td width="78%" class="vtable"> - <input name="gateway" type="text" class="formfld host" id="gateway" size="20" value="<?=htmlspecialchars($pconfig['gateway']);?>"><br /> + <input name="gateway" type="text" class="formfld host" id="gateway" size="20" value="<?=htmlspecialchars($pconfig['gateway']);?>" /><br /> <?=gettext("The default is to use the IP on this interface of the firewall as the gateway. Specify an alternate gateway here if this is not the correct gateway for your network.");?> </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Domain name");?></td> <td width="78%" class="vtable"> - <input name="domain" type="text" class="formfld unknown" id="domain" size="20" value="<?=htmlspecialchars($pconfig['domain']);?>"><br /> + <input name="domain" type="text" class="formfld unknown" id="domain" size="20" value="<?=htmlspecialchars($pconfig['domain']);?>" /><br /> <?=gettext("The default is to use the domain name of this system as the default domain name provided by DHCP. You may specify an alternate domain name here.");?> </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td> <td width="78%" class="vtable"> - <input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"><br /> + <input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>" /><br /> <?=gettext("The DHCP server can optionally provide a domain search list. Use the semicolon character as separator ");?> </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Default lease time");?></td> <td width="78%" class="vtable"> - <input name="deftime" type="text" class="formfld unknown" id="deftime" size="10" value="<?=htmlspecialchars($pconfig['deftime']);?>"> + <input name="deftime" type="text" class="formfld unknown" id="deftime" size="10" value="<?=htmlspecialchars($pconfig['deftime']);?>" /> <?=gettext("seconds");?><br /> <?=gettext("This is used for clients that do not ask for a specific " . "expiration time."); ?><br /> @@ -467,7 +472,7 @@ include("head.inc"); <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Maximum lease time");?></td> <td width="78%" class="vtable"> - <input name="maxtime" type="text" class="formfld unknown" id="maxtime" size="10" value="<?=htmlspecialchars($pconfig['maxtime']);?>"> + <input name="maxtime" type="text" class="formfld unknown" id="maxtime" size="10" value="<?=htmlspecialchars($pconfig['maxtime']);?>" /> <?=gettext("seconds");?><br /> <?=gettext("This is the maximum lease time for clients that ask". " for a specific expiration time."); ?><br /> @@ -478,21 +483,22 @@ include("head.inc"); <td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td> <td width="78%" class="vtable"> <div id="showddnsbox"> - <input type="button" onClick="show_ddns_config()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Dynamic DNS");?></a> + <input type="button" onClick="show_ddns_config()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show Dynamic DNS");?> </div> <div id="showddns" style="display:none"> - <input valign="middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo " checked"; ?>> + <input style="vertical-align:middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo "checked=\"checked\""; ?> /> <b><?=gettext("Enable registration of DHCP client names in DNS.");?></b><br /> <p> - <input name="ddnsdomain" type="text" class="formfld unknown" id="ddnsdomain" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomain']);?>"><br /> + <input name="ddnsdomain" type="text" class="formfld unknown" id="ddnsdomain" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomain']);?>" /><br /> <?=gettext("Note: Leave blank to disable dynamic DNS registration.");?><br /> <?=gettext("Enter the dynamic DNS domain which will be used to register client names in the DNS server.");?> - <input name="ddnsdomainprimary" type="text" class="formfld unknown" id="ddnsdomainprimary" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomainprimary']);?>"><br /> + <input name="ddnsdomainprimary" type="text" class="formfld unknown" id="ddnsdomainprimary" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomainprimary']);?>" /><br /> <?=gettext("Enter the primary domain name server IP address for the dynamic domain name.");?><br /> - <input name="ddnsdomainkeyname" type="text" class="formfld unknown" id="ddnsdomainkeyname" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomainkeyname']);?>"><br /> + <input name="ddnsdomainkeyname" type="text" class="formfld unknown" id="ddnsdomainkeyname" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomainkeyname']);?>" /><br /> <?=gettext("Enter the dynamic DNS domain key name which will be used to register client names in the DNS server.");?> - <input name="ddnsdomainkey" type="text" class="formfld unknown" id="ddnsdomainkey" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomainkey']);?>"><br /> + <input name="ddnsdomainkey" type="text" class="formfld unknown" id="ddnsdomainkey" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomainkey']);?>" /><br /> <?=gettext("Enter the dynamic DNS domain key secret which will be used to register client names in the DNS server.");?> + </p> </div> </td> </tr> @@ -500,11 +506,11 @@ include("head.inc"); <td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td> <td width="78%" class="vtable"> <div id="showntpbox"> - <input type="button" onClick="show_ntp_config()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show NTP configuration");?></a> + <input type="button" onClick="show_ntp_config()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show NTP configuration");?> </div> <div id="showntp" style="display:none"> - <input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="20" value="<?=htmlspecialchars($pconfig['ntp1']);?>"><br /> - <input name="ntp2" type="text" class="formfld unknown" id="ntp2" size="20" value="<?=htmlspecialchars($pconfig['ntp2']);?>"> + <input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="20" value="<?=htmlspecialchars($pconfig['ntp1']);?>" /><br /> + <input name="ntp2" type="text" class="formfld unknown" id="ntp2" size="20" value="<?=htmlspecialchars($pconfig['ntp2']);?>" /> </div> </td> </tr> @@ -512,23 +518,22 @@ include("head.inc"); <td width="22%" valign="top" class="vncell"><?=gettext("TFTP server");?></td> <td width="78%" class="vtable"> <div id="showtftpbox"> - <input type="button" onClick="show_tftp_config()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show TFTP configuration");?></a> + <input type="button" onClick="show_tftp_config()" value="<?=gettext("Advanced");?>" /> - <?=gettext("Show TFTP configuration");?> </div> <div id="showtftp" style="display:none"> - <input name="tftp" type="text" class="formfld unknown" id="tftp" size="50" value="<?=htmlspecialchars($pconfig['tftp']);?>"><br /> + <input name="tftp" type="text" class="formfld unknown" id="tftp" size="50" value="<?=htmlspecialchars($pconfig['tftp']);?>" /><br /> <?=gettext("Leave blank to disable. Enter a full hostname or IP for the TFTP server.");?> </div> </td> </tr> - <tr> <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()"> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()" /> <?php if (isset($id) && $a_maps[$id]): ?> - <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>"> + <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> <?php endif; ?> - <input name="if" type="hidden" value="<?=htmlspecialchars($if);?>"> + <input name="if" type="hidden" value="<?=htmlspecialchars($if);?>" /> </td> </tr> </table> |