diff options
author | thompsa <andy@fud.org.nz> | 2010-02-08 10:28:32 +1300 |
---|---|---|
committer | thompsa <andy@fud.org.nz> | 2010-02-08 10:28:58 +1300 |
commit | 955ef4ea31ab3ea3395d2fb07e38b6fe972f2f00 (patch) | |
tree | 79c220202aae6c7707b7551f589975a559bfc0a8 /config/haproxy-dev/haproxy_pool_edit.php | |
parent | 05044a43a5736001b9cce8fd88af61347c89b822 (diff) | |
download | pfsense-packages-955ef4ea31ab3ea3395d2fb07e38b6fe972f2f00.tar.gz pfsense-packages-955ef4ea31ab3ea3395d2fb07e38b6fe972f2f00.tar.bz2 pfsense-packages-955ef4ea31ab3ea3395d2fb07e38b6fe972f2f00.zip |
Add an edit button to the server list and hide the edit boxes by
default.
Diffstat (limited to 'config/haproxy-dev/haproxy_pool_edit.php')
-rwxr-xr-x | config/haproxy-dev/haproxy_pool_edit.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/config/haproxy-dev/haproxy_pool_edit.php b/config/haproxy-dev/haproxy_pool_edit.php index 9b461de3..5648f247 100755 --- a/config/haproxy-dev/haproxy_pool_edit.php +++ b/config/haproxy-dev/haproxy_pool_edit.php @@ -248,7 +248,14 @@ function clearcombo(){ $counter=0; foreach ($a_servers as $server) { ?> - <tr> + <tr id="tr_view_<?=$counter;?>" name="tr_view_<?=$counter;?>"> + <td class="vtable"><?=$server['name']; ?></td> + <td class="vtable"><?=$server['address']; ?></td> + <td class="vtable"><?=$server['port']; ?></td> + <td class="vtable"><?=$server['weight']; ?></td> + <td class="list"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" onclick="editRow(<?=$counter;?>); return false;"></td> + </tr> + <tr id="tr_edit_<?=$counter;?>" name="tr_edit_<?=$counter;?>" style="display: none;"> <td class="vtable"> <input name="server_name<?=$counter;?>" type="text" value="<?=$server['name']; ?>" size="30"/></td> <td class="vtable"> @@ -374,6 +381,13 @@ function removeRow(el) { el.parentNode.removeChild(el); } } +function editRow(num) { + var trview = document.getElementById('tr_view_' + num); + var tredit = document.getElementById('tr_edit_' + num); + + trview.style.display='none'; + tredit.style.display=''; +} function find_unique_field_name(field_name) { // loop through field_name and strip off -NUMBER |