From: Florian Schmidt Date: Tue, 20 Sep 2016 18:35:30 +0000 (+0200) Subject: HTMLForm: Implement OOUI version of HTMLTagFilter X-Git-Tag: 1.31.0-rc.0~2162^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=92b170efc33c99b985f85543e1b8060a08d4e1ee;p=lhc%2Fweb%2Fwiklou.git HTMLForm: Implement OOUI version of HTMLTagFilter Bug: T117739 Change-Id: Ia9990d1089773f61721cce731bb6cb767a174467 --- diff --git a/includes/htmlform/fields/HTMLTagFilter.php b/includes/htmlform/fields/HTMLTagFilter.php index f58acbe71b..38f9a0a100 100644 --- a/includes/htmlform/fields/HTMLTagFilter.php +++ b/includes/htmlform/fields/HTMLTagFilter.php @@ -23,6 +23,15 @@ class HTMLTagFilter extends HTMLFormField { return ''; } + public function getOOUI( $value ) { + $this->tagFilter = ChangeTags::buildTagFilterSelector( + $value, true, $this->mParent->getContext() ); + if ( $this->tagFilter ) { + return parent::getOOUI( $value ); + } + return new OOUI\FieldLayout( new OOUI\Widget() ); + } + public function getInputHTML( $value ) { if ( $this->tagFilter ) { // we only need the select field, HTMLForm should handle the label @@ -30,4 +39,12 @@ class HTMLTagFilter extends HTMLFormField { } return ''; } + + public function getInputOOUI( $value ) { + if ( $this->tagFilter ) { + // we only need the select field, HTMLForm should handle the label + return $this->tagFilter[1]; + } + return ''; + } }