Amritsreekumar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/359648 )

Change subject: Convert Index: Pages editing form to OOjsUI
......................................................................

Convert Index: Pages editing form to OOjsUI

[WiP]: The Index: Pages editing interface is converted to OOjsUI.

Bug: T153120
Change-Id: I885869211a2b8cc3ccd2cb9019b9f064135c41d4
---
M includes/index/EditIndexPage.php
1 file changed, 10 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/48/359648/1

diff --git a/includes/index/EditIndexPage.php b/includes/index/EditIndexPage.php
index 819389e..f938872 100644
--- a/includes/index/EditIndexPage.php
+++ b/includes/index/EditIndexPage.php
@@ -68,7 +68,7 @@
                }
                $key = $this->getFieldNameForEntry( $entry->getKey() );
                $val = $this->safeUnicodeOutput( $entry->getStringValue() );
-
+               $out->enableOOUI();
                $out->addHTML( Html::openElement( 'tr' ) . Html::openElement( 
'th', [ 'scope' => 'row' ] ) . Xml::label( $entry->getLabel(), $key ) );
 
                $help = $entry->getHelp();
@@ -98,12 +98,18 @@
                                $inputAttributes['type'] = $inputType;
                                $inputAttributes['id'] = $key;
                                $inputAttributes['size'] = 60;
-                               $out->addHTML( Html::input( $key, $val, 
$inputType, $inputAttributes ) );
+                               $out-> OOUI\TextInputWidget( [
+                                       'value' => $val,
+                                       'infusable' => true,
+                               ] + $inputAttributes );
                        } else {
                                $inputAttributes['cols'] = 60;
                                $inputAttributes['rows'] = $size;
-                               $out->addHTML( Html::textarea( $key, $val, 
$inputAttributes ) );
-                       }
+                               $out-> OOUI\TextInputWidget( [
+                                       'value' => $val,
+                                       'infusable' => true,
+                               ] + $inputAttributes );
+                               }
                }
 
                $out->addHTML( Html::closeElement( 'td' ) . Html::closeElement( 
'tr' ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I885869211a2b8cc3ccd2cb9019b9f064135c41d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Amritsreekumar <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to