r109018 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109017‎ | r109018 | r109019 >
Date:08:20, 16 January 2012
Author:laner
Status:ok
Tags:openstack 
Comment:
Collapse puppetinfo section on instance creation, by default and more prominently display the warning.
Modified paths:
  • /trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/special/SpecialNovaInstance.php
@@ -247,6 +247,8 @@
248248
249249 $instanceForm = new SpecialNovaInstanceForm( $instanceInfo, 'openstackmanager-novainstance' );
250250 $instanceForm->setTitle( SpecialPage::getTitleFor( 'NovaInstance' ) );
 251+ $instanceForm->addHeaderText( wfMsg( 'openstackmanager-createinstancepuppetwarning' ) . '<div class="mw-collapsible mw-collapsed">', 'puppetinfo' );
 252+ $instanceForm->addFooterText( '</div>', 'puppetinfo' );
251253 $instanceForm->setSubmitID( 'openstackmanager-novainstance-createinstancesubmit' );
252254 $instanceForm->setSubmitCallback( array( $this, 'tryCreateSubmit' ) );
253255 $instanceForm->show();
@@ -309,13 +311,6 @@
310312 }
311313
312314 function setPuppetInfo( &$instanceInfo, $puppetinfo=array() ) {
313 - if ( !$puppetinfo ) {
314 - $instanceInfo["warning"] = array(
315 - 'type' => 'info',
316 - 'section' => "puppetinfo",
317 - 'default' => wfMsg( 'openstackmanager-createinstancepuppetwarning' ),
318 - );
319 - }
320315 $project = $instanceInfo['project']['default'];
321316 $projectGroups = OpenStackNovaPuppetGroup::getGroupList( $project );
322317 $this->setPuppetInfoByGroups( $instanceInfo, $puppetinfo, $projectGroups );

Status & tagging log