diff options
author | Sam Wilson <sam@samwilson.id.au> | 2017-09-19 15:46:25 +0800 |
---|---|---|
committer | Sam Wilson <sam@samwilson.id.au> | 2017-09-19 15:46:25 +0800 |
commit | feb5be31fddb154cdc659650647d05070bc58bdc (patch) | |
tree | 7136ff9037b862a7555e8449f48be6e9838ab0e2 /includes/htmlform | |
parent | b347d8e101f465836ec451659f338f4b2ece5a4c (diff) | |
download | mediawikicore-feb5be31fddb154cdc659650647d05070bc58bdc.tar.gz mediawikicore-feb5be31fddb154cdc659650647d05070bc58bdc.zip |
Add classes to HTMLCheckMatrix items to identify forced ones
Some items in an HTMLCheckMatrix form field can be forced to be
on or off, in which case they're disabled. This adds three new
class names, so that (for example) Javascript can identify these
checkboxes. There are not currently any classes assigned to them.
Bug: T172585
Change-Id: I984020ce2437effb3ff5f186470105fd80d4a00f
Diffstat (limited to 'includes/htmlform')
-rw-r--r-- | includes/htmlform/fields/HTMLCheckMatrix.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/htmlform/fields/HTMLCheckMatrix.php b/includes/htmlform/fields/HTMLCheckMatrix.php index fa18a3cdadfc..dd4e707ee5d5 100644 --- a/includes/htmlform/fields/HTMLCheckMatrix.php +++ b/includes/htmlform/fields/HTMLCheckMatrix.php @@ -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 ); |