Localisation updates from https://translatewiki.net.
[lhc/web/wiklou.git] / includes / htmlform / HTMLButtonField.php
index f8d017c..9f30ee3 100644 (file)
@@ -24,6 +24,21 @@ class HTMLButtonField extends HTMLFormField {
                return Html::input( $this->mName, $value, $this->buttonType, $attr );
        }
 
+       /**
+        * Get the OOUI widget for this field.
+        * @param string $value
+        * @return OOUI\ButtonInputWidget
+        */
+       public function getInputOOUI( $value ) {
+               return new OOUI\ButtonInputWidget( array(
+                       'name' => $this->mName,
+                       'value' => $value,
+                       'type' => $this->buttonType,
+                       'classes' => array( 'mw-htmlform-submit', $this->mClass ),
+                       'id' => $this->mID,
+               ) + $this->getAttributes( array( 'disabled', 'tabindex' ), array( 'tabindex' => 'tabIndex' ) ) );
+       }
+
        protected function needsLabel() {
                return false;
        }
@@ -31,10 +46,10 @@ class HTMLButtonField extends HTMLFormField {
        /**
         * Button cannot be invalid
         *
-        * @param $value String
-        * @param $alldata Array
+        * @param string $value
+        * @param array $alldata
         *
-        * @return Bool
+        * @return bool
         */
        public function validate( $value, $alldata ) {
                return true;