Merge "Add classes to HTMLCheckMatrix items to identify forced ones"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 20 Sep 2017 19:13:05 +0000 (19:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 20 Sep 2017 19:13:05 +0000 (19:13 +0000)
includes/htmlform/fields/HTMLCheckMatrix.php

index fa18a3c..dd4e707 100644 (file)
@@ -121,9 +121,11 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
                                if ( $this->isTagForcedOff( $thisTag ) ) {
                                        $checked = false;
                                        $thisAttribs['disabled'] = 1;
+                                       $thisAttribs['class'] = 'checkmatrix-forced checkmatrix-forced-off';
                                } elseif ( $this->isTagForcedOn( $thisTag ) ) {
                                        $checked = true;
                                        $thisAttribs['disabled'] = 1;
+                                       $thisAttribs['class'] = 'checkmatrix-forced checkmatrix-forced-on';
                                }
 
                                $checkbox = $this->getOneCheckbox( $checked, $attribs + $thisAttribs );