Add filter to `Special:BlockList` to exclude indefinite blocks
[lhc/web/wiklou.git] / includes / htmlform / fields / HTMLTextField.php
index d988c29..56589b0 100644 (file)
@@ -85,18 +85,19 @@ class HTMLTextField extends HTMLFormField {
                        'type',
                        'min',
                        'max',
-                       'pattern',
-                       'title',
                        'step',
-                       'list',
+                       'title',
                        'maxlength',
                        'tabindex',
                        'disabled',
                        'required',
                        'autofocus',
-                       'multiple',
                        'readonly',
                        'autocomplete',
+                       // Only used in HTML mode:
+                       'pattern',
+                       'list',
+                       'multiple',
                ];
 
                $attribs += $this->getAttributes( $allowedParams );
@@ -130,6 +131,9 @@ class HTMLTextField extends HTMLFormField {
                                case 'url':
                                        $type = $this->mParams['type'];
                                        break;
+                               case 'textwithbutton':
+                                       $type = $this->mParams['inputtype'] ?? 'text';
+                                       break;
                        }
                }
 
@@ -153,17 +157,22 @@ class HTMLTextField extends HTMLFormField {
                # @todo Enforce pattern, step, required, readonly on the server side as
                # well
                $allowedParams = [
+                       'type',
+                       'min',
+                       'max',
+                       'step',
+                       'title',
+                       'maxlength',
+                       'tabindex',
+                       'disabled',
+                       'required',
                        'autofocus',
+                       'readonly',
+                       'autocomplete',
+                       // Only used in OOUI mode:
                        'autosize',
-                       'disabled',
                        'flags',
                        'indicator',
-                       'maxlength',
-                       'readonly',
-                       'required',
-                       'tabindex',
-                       'type',
-                       'autocomplete',
                ];
 
                $attribs += OOUI\Element::configFromHtmlAttributes(