From: Andrew Garrett Date: Mon, 27 Apr 2009 00:55:23 +0000 (+0000) Subject: Fix display of inverted check fields in HTML forms -- fixes bug 18581. X-Git-Tag: 1.31.0-rc.0~41994 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=9b533ab58c9a73be6de948a508fd3914ea734445;p=lhc%2Fweb%2Fwiklou.git Fix display of inverted check fields in HTML forms -- fixes bug 18581. --- diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index f77ff4c64c..a2be6cc29c 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -525,6 +525,9 @@ class HTMLIntField extends HTMLTextField { class HTMLCheckField extends HTMLFormField { function getInputHTML( $value ) { + if ( !empty( $this->mParams['invert'] ) ) + $value = !$value; + return Xml::check( $this->mName, $value, array( 'id' => $this->mID ) ) . ' ' . Xml::tags( 'label', array( 'for' => $this->mID ), $this->mLabel ); }