dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Maintenance script for exporting site definitions"
[lhc/web/wiklou.git]
/
includes
/
htmlform
/
HTMLCheckMatrix.php
diff --git
a/includes/htmlform/HTMLCheckMatrix.php
b/includes/htmlform/HTMLCheckMatrix.php
index
6c538fd
..
83f1266
100644
(file)
--- a/
includes/htmlform/HTMLCheckMatrix.php
+++ b/
includes/htmlform/HTMLCheckMatrix.php
@@
-178,6
+178,13
@@
class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
$helptext = $this->getHelpTextHtmlTable( $this->getHelpText() );
$cellAttributes = array( 'colspan' => 2 );
$helptext = $this->getHelpTextHtmlTable( $this->getHelpText() );
$cellAttributes = array( 'colspan' => 2 );
+ $hideClass = '';
+ $hideAttributes = array();
+ if ( $this->mHideIf ) {
+ $hideAttributes['data-hide-if'] = FormatJson::encode( $this->mHideIf );
+ $hideClass = 'mw-htmlform-hide-if';
+ }
+
$label = $this->getLabelHtml( $cellAttributes );
$field = Html::rawElement(
$label = $this->getLabelHtml( $cellAttributes );
$field = Html::rawElement(
@@
-186,9
+193,12
@@
class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
$inputHtml . "\n$errors"
);
$inputHtml . "\n$errors"
);
- $html = Html::rawElement( 'tr', array( 'class' => 'mw-htmlform-vertical-label' ), $label );
+ $html = Html::rawElement( 'tr',
+ array( 'class' => "mw-htmlform-vertical-label $hideClass" ) + $hideAttributes,
+ $label );
$html .= Html::rawElement( 'tr',
$html .= Html::rawElement( 'tr',
- array( 'class' => "mw-htmlform-field-$fieldType {$this->mClass} $errorClass" ),
+ array( 'class' => "mw-htmlform-field-$fieldType {$this->mClass} $errorClass $hideClass" ) +
+ $hideAttributes,
$field );
return $html . $helptext;
$field );
return $html . $helptext;