Index: trunk/extensions/EducationProgram/EducationProgram.php |
— | — | @@ -343,6 +343,15 @@ |
344 | 344 | ), |
345 | 345 | ); |
346 | 346 | |
| 347 | +$wgResourceModules['ep.ambprofile'] = $moduleTemplate + array( |
| 348 | + 'scripts' => array( |
| 349 | + 'ep.ambprofile.js', |
| 350 | + ), |
| 351 | + 'dependencies' => array( |
| 352 | + 'jquery.ui.button', |
| 353 | + ), |
| 354 | +); |
| 355 | + |
347 | 356 | $wgResourceModules['ep.addorg'] = $moduleTemplate + array( |
348 | 357 | 'scripts' => array( |
349 | 358 | 'ep.addorg.js', |
Index: trunk/extensions/EducationProgram/actions/EPEditAction.php |
— | — | @@ -225,8 +225,6 @@ |
226 | 226 | $action = $this->isNew() ? 'add' : 'edit'; |
227 | 227 | $form->setWrapperLegend( $this->msg( strtolower( $this->getName() ) . '-' . $action . '-legend' ) ); |
228 | 228 | |
229 | | - $c = $this->getItemClass(); // Yeah, this is needed in PHP 5.3 >_> |
230 | | - |
231 | 229 | $form->addButton( |
232 | 230 | 'cancelEdit', |
233 | 231 | wfMsg( 'cancel' ), |
Index: trunk/extensions/EducationProgram/specials/SpecialAmbassadorProfile.php |
— | — | @@ -33,8 +33,16 @@ |
34 | 34 | } |
35 | 35 | |
36 | 36 | parent::execute( $subPage ); |
| 37 | + |
| 38 | + $this->getOutput()->addModules( 'ep.ambprofile' ); |
37 | 39 | } |
38 | 40 | |
| 41 | + protected function getForm() { |
| 42 | + $form = parent::getForm(); |
| 43 | + $form->setSubmitTooltip( 'ep-form-save' ); |
| 44 | + return $form; |
| 45 | + } |
| 46 | + |
39 | 47 | protected function getMsgPrefix() { |
40 | 48 | return strtolower( $this->getClassName() ) . '-'; |
41 | 49 | } |
Index: trunk/extensions/EducationProgram/resources/ep.ambprofile.js |
— | — | @@ -0,0 +1,13 @@ |
| 2 | +/** |
| 3 | + * JavasSript for the Education Program MediaWiki extension. |
| 4 | + * @see https://www.mediawiki.org/wiki/Extension:Education_Program |
| 5 | + * |
| 6 | + * @licence GNU GPL v3 or later |
| 7 | + * @author Jeroen De Dauw <jeroendedauw at gmail dot com> |
| 8 | + */ |
| 9 | + |
| 10 | +(function( $, mw ) { |
| 11 | + |
| 12 | + $( '#bodyContent' ).find( '[type="submit"]' ).button(); |
| 13 | + |
| 14 | +})( window.jQuery, window.mediaWiki ); |
\ No newline at end of file |