Created
August 14, 2011 16:30
-
-
Save BlueSkyDetector/1145042 to your computer and use it in GitHub Desktop.
fix_inherited_item_changing_error_with_no_multiplier_and_formula.patch for zabbix-1.8.6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -uNrp zabbix-1.8.6.orig/frontends/php/include/forms.inc.php zabbix-1.8.6/frontends/php/include/forms.inc.php | |
--- zabbix-1.8.6.orig/frontends/php/include/forms.inc.php 2011-08-12 01:33:40.000000000 +0900 | |
+++ zabbix-1.8.6/frontends/php/include/forms.inc.php 2011-08-15 01:38:21.000000000 +0900 | |
@@ -1929,15 +1929,13 @@ ITEM_TYPE_CALCULATED $key = ''; $params | |
$mcb = new CCheckBox('multiplier', $multiplier == 1 ? 'yes':'no'); | |
$mcb->setAttribute('disabled', 'disabled'); | |
$mltpbox[] = $mcb; | |
- if($multiplier){ | |
- $mltpbox[] = SPACE; | |
- $ctb = new CTextBox('formula', $formula, 10, 1); | |
- $ctb->setAttribute('style', 'text-align: right;'); | |
- $mltpbox[] = $ctb; | |
- } | |
- else{ | |
- $frmItem->addVar('formula', $formula); | |
+ $mltpbox[] = SPACE; | |
+ $ctb = new CTextBox('formula', $formula, 10, 1); | |
+ $ctb->setAttribute('style', 'text-align: right;'); | |
+ if(!$multiplier){ | |
+ $ctb->setEnabled('no'); | |
} | |
+ $mltpbox[] = $ctb; | |
} | |
else{ | |
$mltpbox[] = new CCheckBox('multiplier',$multiplier == 1 ? 'yes':'no', 'var editbx = document.getElementById(\'formula\'); if(editbx) editbx.disabled = !this.checked;', 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment