From 9b533ab58c9a73be6de948a508fd3914ea734445 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Mon, 27 Apr 2009 00:55:23 +0000 Subject: [PATCH] Fix display of inverted check fields in HTML forms -- fixes bug 18581. --- includes/HTMLForm.php | 3 +++ 1 file changed, 3 insertions(+) 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 ); } -- 2.20.1