From 0857a5219fc220a8720e939135378ea591fc7652 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 17 Oct 2007 02:16:35 +0000 Subject: Do not allow user to set values for items that do not require it. --- packages/openbgpd/openbgpd.inc | 32 ++++++++++++++++++++++++++++++++ packages/openbgpd/openbgpd_neighbors.xml | 6 ++++-- 2 files changed, 36 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/openbgpd/openbgpd.inc b/packages/openbgpd/openbgpd.inc index ab98487d..8d45d966 100644 --- a/packages/openbgpd/openbgpd.inc +++ b/packages/openbgpd/openbgpd.inc @@ -133,6 +133,38 @@ function deinstall_openbgpd() { exec("rm /usr/local/etc/rc.d/bgpd.sh"); } +function grey_out_value_boxes() { + echo << + function grey_out_value_boxes() { + var x = 0; + for(x=0; x<99; x++) { + if( \$('paramaters' + x) ) { + var fieldvalue = $('paramaters' + x).options[$('paramaters' + x).selectedIndex].text; + var length = fieldvalue.length; + length = length -2; + var last_two = fieldvalue.substring(length); + if( \$('parmvalue' + x) ) { + if(last_two != ' X') { + \$('parmvalue' + x).value = ''; + \$('parmvalue' + x).disabled = true; + } else { + \$('parmvalue' + x).disabled = false; + } + } + } + } + } + + + var timerID = setTimeout("grey_out_value_boxes()", 1000); + + + +EOF; + +} + function is_openbgpd_running() { $status = `ps awux | grep bgpd | grep "parent" | wc -l | awk '{ print \$1 }'`; if(intval($status) > 0) diff --git a/packages/openbgpd/openbgpd_neighbors.xml b/packages/openbgpd/openbgpd_neighbors.xml index 3ff699da..959dde03 100644 --- a/packages/openbgpd/openbgpd_neighbors.xml +++ b/packages/openbgpd/openbgpd_neighbors.xml @@ -159,11 +159,13 @@ } $counter++; } - openbgpd_install_conf(); - + + grey_out_value_boxes(); + + \ No newline at end of file -- cgit v1.2.3