Make warning about deprecated SlotDiffRenderer wrapper less noisy
[lhc/web/wiklou.git] / includes / widget / SelectWithInputWidget.php
index a3482fe..262903d 100644 (file)
@@ -8,7 +8,7 @@ use OOUI\TextInputWidget;
 /**
  * Select and input widget.
  *
- * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
+ * @copyright 2011-2017 MediaWiki Widgets Team and others; see AUTHORS.txt
  * @license MIT
  */
 class SelectWithInputWidget extends \OOUI\Widget {
@@ -36,6 +36,11 @@ class SelectWithInputWidget extends \OOUI\Widget {
                        $config
                );
 
+               if ( isset( $config['disabled'] ) && $config['disabled'] == true ) {
+                       $config['textinput']['disabled'] = true;
+                       $config['dropdowninput']['disabled'] = true;
+               }
+
                parent::__construct( $config );
 
                // Properties