From 92b170efc33c99b985f85543e1b8060a08d4e1ee Mon Sep 17 00:00:00 2001 From: Florian Schmidt Date: Tue, 20 Sep 2016 20:35:30 +0200 Subject: [PATCH] HTMLForm: Implement OOUI version of HTMLTagFilter Bug: T117739 Change-Id: Ia9990d1089773f61721cce731bb6cb767a174467 --- includes/htmlform/fields/HTMLTagFilter.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 ''; + } } -- 2.20.1