Glaisher has uploaded a new change for review. https://gerrit.wikimedia.org/r/278747
Change subject: Use HTMLForm in Special:ViewUserLang ...................................................................... Use HTMLForm in Special:ViewUserLang Change-Id: I3fb44254a7e3d40832f322c88888846c4b90cd6a --- M SpecialViewUserLang.php 1 file changed, 15 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaIncubator refs/changes/47/278747/1 diff --git a/SpecialViewUserLang.php b/SpecialViewUserLang.php index 176736c..3a6f50a 100644 --- a/SpecialViewUserLang.php +++ b/SpecialViewUserLang.php @@ -45,20 +45,22 @@ * @param $target Mixed: user whose language and test wiki we're about to look up */ function showForm( $target ) { - global $wgScript; - - $this->getOutput()->addHTML( - Xml::fieldset( wfMessage( 'wminc-viewuserlang' )->plain() ) . - Xml::openElement( 'form', [ 'method' => 'get', 'action' => $wgScript ] ) . - Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) . - "<p>" . - Xml::inputLabel( wfMessage( 'wminc-viewuserlang-user' )->text(), 'target', 'viewuserlang-username', 40, $target ) . - ' ' . - Xml::submitButton( wfMessage( 'wminc-viewuserlang-go' )->text() ) . - "</p>" . - Xml::closeElement( 'form' ) . - Xml::closeElement( 'fieldset' ) + $form = HTMLForm::factory( 'table', [ + 'Target' => [ + 'type' => 'user', + 'name' => 'target', + 'id' => 'viewuserlang-username', + 'size' => 40, + 'label-message' => 'wminc-viewuserlang-user', + 'default' => $target, + ] ], + $this->getContext() ); + $form->setMethod( 'get' ) + ->setWrapperLegendMsg( 'wminc-viewuserlang' ) + ->setSubmitTextMsg( 'wminc-viewuserlang-go' ) + ->prepareForm() + ->displayForm( false ); } /** -- To view, visit https://gerrit.wikimedia.org/r/278747 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3fb44254a7e3d40832f322c88888846c4b90cd6a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaIncubator Gerrit-Branch: master Gerrit-Owner: Glaisher <glaisher.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits