summaryrefslogtreecommitdiffstats
path: root/usr/local/www/load_balancer_virtual_server_edit.php
diff options
context:
space:
mode:
authorColin Fleming <cj_fleming@sky.com>2014-04-18 22:55:25 +0100
committerColin Fleming <cj_fleming@sky.com>2014-04-18 22:55:25 +0100
commit76523ef54b2b7aeee4278e78f22e9e7b3f71198e (patch)
treeba02eb8d79399d529ebc7495095c9e219f9c21f2 /usr/local/www/load_balancer_virtual_server_edit.php
parent928dc66a4341eeb7d84d79d7a331462107863170 (diff)
downloadpfsense-76523ef54b2b7aeee4278e78f22e9e7b3f71198e.zip
pfsense-76523ef54b2b7aeee4278e78f22e9e7b3f71198e.tar.gz
Tidy up "load_balancer_virtual_server" XHTML
Add SUMMARY to tables Update PHP shorthand Move "fbegin.inc" inbetween BODY and SCRIPT Close INPUT tags Update HTML Boolean operators Move closing SELECT into the PHP IF statement Move the "save" and "cancel" buttons into right-hand column
Diffstat (limited to 'usr/local/www/load_balancer_virtual_server_edit.php')
-rw-r--r--usr/local/www/load_balancer_virtual_server_edit.php35
1 files changed, 18 insertions, 17 deletions
diff --git a/usr/local/www/load_balancer_virtual_server_edit.php b/usr/local/www/load_balancer_virtual_server_edit.php
index 6066c4d..d2136e7 100644
--- a/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/usr/local/www/load_balancer_virtual_server_edit.php
@@ -148,32 +148,32 @@ include("head.inc");
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+<?php include("fbegin.inc"); ?>
<script type="text/javascript" src="/javascript/autosuggest.js"></script>
<script type="text/javascript" src="/javascript/suggestions.js"></script>
-<?php include("fbegin.inc"); ?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<form action="load_balancer_virtual_server_edit.php" method="post" name="iform" id="iform">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="load balancer server entry">
<tr>
<td colspan="3" valign="top" class="listtopic"><?=gettext("Edit Load Balancer - Virtual Server entry"); ?></td>
</tr>
<tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Name"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"" . htmlspecialchars($pconfig['name']) . "\"";?>size="32" maxlength="32">
+ <input name="name" type="text" <?if(isset($pconfig['name'])) echo "value=\"" . htmlspecialchars($pconfig['name']) . "\"";?> size="32" maxlength="32" />
</td>
</tr>
<tr align="left">
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <input name="descr" type="text" <?if(isset($pconfig['descr'])) echo "value=\"" . htmlspecialchars($pconfig['descr']) . "\"";?>size="64">
+ <input name="descr" type="text" <?if(isset($pconfig['descr'])) echo "value=\"" . htmlspecialchars($pconfig['descr']) . "\"";?> size="64" />
</td>
</tr>
<tr align="left">
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP Address"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <input class="formfldalias" id="ipaddr" name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"" . htmlspecialchars($pconfig['ipaddr']) . "\"";?> size="39" maxlength="39">
+ <input class="formfldalias" id="ipaddr" name="ipaddr" type="text" <?if(isset($pconfig['ipaddr'])) echo "value=\"" . htmlspecialchars($pconfig['ipaddr']) . "\"";?> size="39" maxlength="39" />
<br /><?=gettext("This is normally the WAN IP address that you would like the server to listen on. All connections to this IP and port will be forwarded to the pool cluster."); ?>
<br /><?=gettext("You may also specify a host alias listed in Firewall -&gt; Aliases here."); ?>
<script type="text/javascript">
@@ -187,7 +187,7 @@ include("head.inc");
<tr align="left">
<td width="22%" valign="top" class="vncell"><?=gettext("Port"); ?></td>
<td width="78%" class="vtable" colspan="2">
- <input class="formfldalias" name="port" id="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"" . htmlspecialchars($pconfig['port']) . "\"";?> size="16" maxlength="16">
+ <input class="formfldalias" name="port" id="port" type="text" <?if(isset($pconfig['port'])) echo "value=\"" . htmlspecialchars($pconfig['port']) . "\"";?> size="16" maxlength="16" />
<br /><?=gettext("This is the port that the clients will connect to. All connections to this port will be forwarded to the pool cluster."); ?>
<br /><?=gettext("If left blank, listening ports from the pool will be used."); ?>
<br /><?=gettext("You may also specify a port alias listed in Firewall -&gt; Aliases here."); ?>
@@ -210,12 +210,12 @@ include("head.inc");
for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$selected = "";
if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['poolname'] )
- $selected = " SELECTED";
+ $selected = " selected=\"selected\"";
echo "<option value=\"" . htmlspecialchars($config['load_balancer']['lbpool'][$i]['name']) . "\"{$selected}>{$config['load_balancer']['lbpool'][$i]['name']}</option>";
}
?>
- <?php endif; ?>
</select>
+ <?php endif; ?>
</td>
</tr>
<tr align="left">
@@ -230,7 +230,7 @@ include("head.inc");
for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$selected = "";
if ( $config['load_balancer']['lbpool'][$i]['name'] == $pconfig['sitedown'] )
- $selected = " SELECTED";
+ $selected = " selected=\"selected\"";
echo "<option value=\"" . htmlspecialchars($config['load_balancer']['lbpool'][$i]['name']) . "\"{$selected}>{$config['load_balancer']['lbpool'][$i]['name']}</option>";
}
?>
@@ -240,13 +240,13 @@ include("head.inc");
<?php endif; ?>
</td>
</tr>
- <input type="hidden" name="mode" value="redirect_mode">
+ <tr style="display:none;"><td><input type="hidden" name="mode" value="redirect_mode" /></td></tr>
<!--
<tr align="left">
<td width="22%" valign="top" class="vncellreq">Mode</td>
<td width="78%" class="vtable" colspan="2">
- <input id="redirect_mode" type="radio" name="mode" value="redirect"<?=htmlspecialchars($pconfig['mode']) == 'redirect' ? ' checked="checked"': ''?>> Redirect
- <input id="relay_mode" type="radio" name="mode" value="relay"<?=htmlspecialchars($pconfig['mode']) == 'relay' ? ' checked="checked"': ''?>> Relay
+ <input id="redirect_mode" type="radio" name="mode" value="redirect"<?=htmlspecialchars($pconfig['mode']) == 'redirect' ? ' checked="checked"': ''?> /> Redirect
+ <input id="relay_mode" type="radio" name="mode" value="relay"<?=htmlspecialchars($pconfig['mode']) == 'relay' ? ' checked="checked"': ''?> /> Relay
<br />
</td>
@@ -261,7 +261,7 @@ include("head.inc");
foreach ($lb_def_protos as $lb_proto) {
$selected = "";
if ( $pconfig['relay_protocol'] == $lb_proto )
- $selected = " SELECTED";
+ $selected = " selected=\"selected\"";
echo "<option value=\"{$lb_proto}\"{$selected}>{$lb_proto}</option>";
}
?>
@@ -270,11 +270,12 @@ include("head.inc");
</td>
</tr>
<tr align="left">
- <td align="left" valign="bottom">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>">
- <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()">
+ <td width="22%" valign="top">&nbsp;</td>
+ <td align="left" valign="bottom" width="78%">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Submit"); ?>" />
+ <input type="button" class="formbtn" value="<?=gettext("Cancel"); ?>" onclick="history.back()" />
<?php if (isset($id) && $a_vs[$id] && $_GET['act'] != 'dup'): ?>
- <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
+ <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php endif; ?>
</td>
</tr>
OpenPOWER on IntegriCloud