r44337 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44336‎ | r44337 | r44338 >
Date:13:52, 9 December 2008
Author:werdna
Status:ok
Tags:
Comment:
If possible, present a selector-box for wiki selection, instead of a textbox with a list of 'authorized values' above.
Modified paths:
  • /trunk/extensions/Configure/Configure.i18n.php (modified) (history)
  • /trunk/extensions/Configure/Configure.page.php (modified) (history)
  • /trunk/extensions/Configure/SpecialViewConfig.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Configure/Configure.page.php
@@ -419,10 +419,14 @@
420420 $form .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
421421 $form .= Xml::hidden( 'title', $this->getTitle()->getPrefixedDBkey() );
422422 if ( is_array( $wgConfigureWikis ) ) {
423 - $form .= wfMsgExt( 'configure-select-wiki-available',
424 - array( 'parse' ), implode( ', ', $wgConfigureWikis ) );
 423+ $selector = new XmlSelect( 'wiki', 'wiki', $this->mWiki );
 424+ foreach( $wgConfigureWikis as $wiki ) {
 425+ $selector->addOption( $wiki );
 426+ }
 427+ $form .= $selector->getHTML();
 428+ } else {
 429+ $form .= Xml::input( 'wiki', false, $this->mWiki );
425430 }
426 - $form .= Xml::input( 'wiki', false, $this->mWiki );
427431 $form .= Xml::submitButton( wfMsg( 'configure-select-wiki-submit' ) );
428432 $form .= '</form></fieldset>';
429433 return $form;
Index: trunk/extensions/Configure/SpecialViewConfig.php
@@ -279,15 +279,21 @@
280280 $form .= wfMsgExt( 'configure-select-wiki-view-desc', array( 'parse' ) );
281281 $form .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
282282 $form .= Xml::hidden( 'title', $this->getTitle()->getPrefixedDBkey() );
283 - if ( is_array( $wgConfigureWikis ) ) {
284 - $form .= wfMsgExt( 'configure-select-wiki-available',
285 - array( 'parse' ), implode( ', ', $wgConfigureWikis ) );
286 - }
287283 $all = ( $wgRequest->getVal( 'view', 'all' ) == 'all' );
288284 $form .= Xml::radioLabel( wfMsg( 'configure-select-wiki-view-all' ), 'view', 'all', 'wiki-all', $all );
289285 $form .= "<br />\n";
290286 $form .= Xml::radioLabel( wfMsg( 'configure-select-wiki-view-specific' ), 'view', 'specific', 'wiki-specific', !$all ) . ' ';
291 - $form .= Xml::input( 'wiki', false, $this->mWiki ) . "<br />\n";
 287+
 288+ if ( is_array( $wgConfigureWikis ) ) {
 289+ $selector = new XmlSelect( 'wiki', 'wiki', $this->mWiki );
 290+ foreach( $wgConfigureWikis as $wiki ) {
 291+ $selector->addOption( $wiki );
 292+ }
 293+ $form .= $selector->getHTML() . "<br/>";
 294+ } else {
 295+ $form .= Xml::input( 'wiki', false, $this->mWiki )."<br/>";
 296+ }
 297+
292298 $form .= Xml::submitButton( wfMsg( 'configure-select-wiki-submit' ) );
293299 $form .= '</form></fieldset>';
294300 return $form;
Index: trunk/extensions/Configure/Configure.i18n.php
@@ -132,12 +132,11 @@
133133 'configure-section-thumbnail' => 'Image thumbnailing',
134134 'configure-section-output' => 'Output',
135135 'configure-select-wiki' => 'Wiki selection',
136 - 'configure-select-wiki-available' => 'Authorized values: $1',
137136 'configure-select-wiki-desc' => 'Select the wiki you want to configure.',
138137 'configure-select-wiki-view-desc' => 'Select a wiki for which you want to see the versions.',
139138 'configure-select-wiki-view-all' => 'All wikis',
140139 'configure-select-wiki-view-specific' => 'Specific wiki:',
141 - 'configure-select-wiki-submit' => 'Validate',
 140+ 'configure-select-wiki-submit' => 'Select',
142141 'configure-setting-not-available' => 'This setting is not available in this version of MediaWiki',
143142 'configure-transwiki-not-in-range' => 'The requested wiki, $1, is not in allowed values ($2).',
144143 'configure-view' => 'View',

Status & tagging log