aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/openbgpd/openbgpd.inc32
-rw-r--r--packages/openbgpd/openbgpd_neighbors.xml6
2 files changed, 36 insertions, 2 deletions
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 <<<EOF
+ <script language="javascript">
+ 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);
+ </script>
+
+
+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++;
}
-
</custom_php_command_before_form>
<custom_php_deinstall_command>
</custom_php_deinstall_command>
<custom_php_resync_config_command>
openbgpd_install_conf();
</custom_php_resync_config_command>
-</packagegui>
+ <custom_php_after_form_command>
+ grey_out_value_boxes();
+ </custom_php_after_form_command>
+</packagegui> \ No newline at end of file