jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/395092 )

Change subject: PHP TextInputWidget: Remove remaining type 'search' specific 
code
......................................................................


PHP TextInputWidget: Remove remaining type 'search' specific code

TextInputWidget `type='search'` support was removed in JS in
I4fbe336fafaaa6c9e228802e4e9463d11009be72 but some PHP code remained.
Let's get rid of it.

Change-Id: I8ae76d24582493dc069578137d53c497016f0a85
---
M php/widgets/TextInputWidget.php
1 file changed, 1 insertion(+), 16 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/php/widgets/TextInputWidget.php b/php/widgets/TextInputWidget.php
index 14e68f6..9b84d8e 100644
--- a/php/widgets/TextInputWidget.php
+++ b/php/widgets/TextInputWidget.php
@@ -41,12 +41,8 @@
 
        /**
         * @param array $config Configuration options
-        * @param string $config['type'] HTML tag `type` attribute: 'text', 
'password', 'search', 'email',
+        * @param string $config['type'] HTML tag `type` attribute: 'text', 
'password', 'email',
         *   'url' or 'number'. Ignored if `multiline` is true. (default: 
'text')
-        *
-        *   Some values of `type` result in additional behaviors:
-        *   - `search`: implies `icon: 'search'` and `indicator: 'clear'`; 
when clicked, the indicator
-        *     empties the text field
         * @param string $config['placeholder'] Placeholder text
         * @param bool $config['autofocus'] Ask the browser to focus this 
widget, using the 'autofocus'
         *   HTML attribute (default: false)
@@ -70,11 +66,6 @@
                        'required' => false,
                        'autocomplete' => true,
                ], $config );
-               if ( $config['type'] === 'search' ) {
-                       if ( !array_key_exists( 'icon', $config ) ) {
-                               $config['icon'] = 'search';
-                       }
-               }
 
                // Parent constructor
                parent::__construct( $config );
@@ -87,12 +78,6 @@
                        Element::warnDeprecation(
                                'The TextInputWidget "multiline" option is 
deprecated as of OOjs UI v0.22.2. ' .
                                'Use MultilineTextInputWidget instead.'
-                       );
-               }
-               if ( $config['type'] === 'search' && !( $this instanceof 
SearchInputWidget ) ) {
-                       Element::warnDeprecation(
-                               'The TextInputWidget "type" => "search" is 
deprecated as of OOjs UI v0.22.2. ' .
-                               'Use SearchInputWidget instead.'
                        );
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/395092
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ae76d24582493dc069578137d53c497016f0a85
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE <volke...@wikimedia.org>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Prtksxna <psax...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to