aboutsummaryrefslogtreecommitdiffstats
path: root/packages/openbgpd
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-10-17 02:16:35 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-10-17 02:16:35 +0000
commit0857a5219fc220a8720e939135378ea591fc7652 (patch)
treecba74efc881194b9156aa8fd914b202506cdab6c /packages/openbgpd
parent3ee33f0839da09d3403fee17ebcecb7bdc3ba864 (diff)
downloadpfsense-packages-0857a5219fc220a8720e939135378ea591fc7652.tar.gz
pfsense-packages-0857a5219fc220a8720e939135378ea591fc7652.tar.bz2
pfsense-packages-0857a5219fc220a8720e939135378ea591fc7652.zip
Do not allow user to set values for items that do not require it.
Diffstat (limited to 'packages/openbgpd')
-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