Eugene233 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381189 )
Change subject: Build lexicon page to accept data entry and display content ...................................................................... Build lexicon page to accept data entry and display content This entails designing the special page for the tool where the volunteer(user) will be able to search for an article by its name and then the results (cleaned text) will be displayed below. Bug: T176289 Change-Id: I5fe26a527a0c1c9939ee3497a03544a5154def7b --- M i18n/en.json M specials/SpecialWikispeechLexiconTool.php 2 files changed, 24 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikispeech refs/changes/89/381189/1 diff --git a/i18n/en.json b/i18n/en.json index f082412..dafc874 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -9,8 +9,8 @@ "special-wikispeech-intro": "Wikispeech", "special-wikispeech-title": "Special page introduction.", "wikispeechlexicontool": "Wikispeech Lexicon Tool", - "special-wikispeech-lexicon-tool-intro": "Wikispeech Lexicon Tool", - "special-wikispeech-lexicon-tool-title": "The tool used to add suggested words into the Wikispeech lexicon.", + "special-wikispeech-lexicon-tool-intro": "The tool used to add suggested words into the Wikispeech lexicon", + "special-wikispeech-lexicon-tool-title": "Wikispeech Lexicon Tool", "apihelp-wikispeech-summary": "Process a page to be used by the Wikispeech extension.", "apihelp-wikispeech-param-page": "The title of the page to process.", "apihelp-wikispeech-param-output": "The formats of the output, can be a combination of the following:", diff --git a/specials/SpecialWikispeechLexiconTool.php b/specials/SpecialWikispeechLexiconTool.php index 704328e..d36a2cb 100644 --- a/specials/SpecialWikispeechLexiconTool.php +++ b/specials/SpecialWikispeechLexiconTool.php @@ -19,7 +19,28 @@ $out = $this->getOutput(); $out->setPageTitle( $this->msg( 'special-wikispeech-lexicon-tool-title' ) ); $out->addHelpLink( 'How to become a MediaWiki hacker' ); - $out->addWikiMsg( 'special-wikispeech-lexicon-tool-intro' ); + + $searchformDescriptor = array( + 'searchfield' => array( + 'id' => 'ext-wikispeech-article-search', + 'class' => 'HTMLTextField', + 'placeholder' => 'Enter article name', + 'required' => true, + ), + ); + + $searchForm = new HTMLForm( $searchformDescriptor, $this->getContext(), 'searchForm' ); # We build the HTMLForm object + $searchForm->setFormIdentifier( 'searchForm' ); + $searchForm = HTMLForm::factory( 'ooui', $searchformDescriptor, $this->getContext() ); + $searchForm->setSubmitText( 'Search' ); # What text does the submit button display + $searchForm->setSubmitCallback( + array( 'SpecialWikispeechLexiconTool', 'searchArticle' ) + ); + $searchForm->setMethod( 'get' ); + $searchForm->prepareForm()->displayForm( false ); + + $this->getOutput()->addHTML('<h1></h1>'); + $this->getOutput()->addHTML('<h4> Our results will have to be placed here</h4>'); } /** -- To view, visit https://gerrit.wikimedia.org/r/381189 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5fe26a527a0c1c9939ee3497a03544a5154def7b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikispeech Gerrit-Branch: master Gerrit-Owner: Eugene233 <agboreug...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits