Merge "registration: Only allow one extension to set a specific config setting"
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLTagFilter.php
index f58acbe..38f9a0a 100644 (file)
@@ -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 '';
+       }
 }