Index: trunk/extensions/Contest/specials/SpecialContestSubmission.php |
— | — | @@ -120,9 +120,11 @@ |
121 | 121 | $form->setSubmitText( wfMsg( 'contest-submission-submit' ) ); |
122 | 122 | |
123 | 123 | if( $form->show() ){ |
124 | | - // TODO: we might want to have a title field here |
125 | 124 | $this->getOutput()->redirect( $this->getTitle( $contestant->getContest()->getField( 'name' ) )->getLocalURL() ); |
126 | 125 | } |
| 126 | + else { |
| 127 | + $this->getOutput()->addModules( 'contest.special.submission' ); |
| 128 | + } |
127 | 129 | } |
128 | 130 | |
129 | 131 | /** |
Index: trunk/extensions/Contest/specials/SpecialContestSignup.php |
— | — | @@ -162,6 +162,9 @@ |
163 | 163 | if( $form->show() ){ |
164 | 164 | $this->showSucess( $contest ); |
165 | 165 | } |
| 166 | + else { |
| 167 | + $this->getOutput()->addModules( 'contest.special.signup' ); |
| 168 | + } |
166 | 169 | } |
167 | 170 | |
168 | 171 | /** |
Index: trunk/extensions/Contest/Contest.php |
— | — | @@ -159,13 +159,29 @@ |
160 | 160 | 'styles' => array( |
161 | 161 | 'contest.special.welcome.css', |
162 | 162 | ), |
163 | | - 'messages' => array( |
| 163 | + 'dependencies' => array( |
| 164 | + 'jquery.ui.button' |
| 165 | + ) |
| 166 | +); |
| 167 | + |
| 168 | +$wgResourceModules['contest.special.signup'] = $moduleTemplate + array( |
| 169 | + 'scripts' => array( |
| 170 | + 'contest.special.signup.js', |
164 | 171 | ), |
165 | 172 | 'dependencies' => array( |
166 | 173 | 'jquery.ui.button' |
167 | 174 | ) |
168 | 175 | ); |
169 | 176 | |
| 177 | +$wgResourceModules['contest.special.submission'] = $moduleTemplate + array( |
| 178 | + 'scripts' => array( |
| 179 | + 'contest.special.submission.js', |
| 180 | + ), |
| 181 | + 'dependencies' => array( |
| 182 | + 'jquery.ui.button' |
| 183 | + ) |
| 184 | +); |
| 185 | + |
170 | 186 | unset( $moduleTemplate ); |
171 | 187 | |
172 | 188 | $egContestSettings = array(); |
Index: trunk/extensions/Contest/resources/contest.special.submission.js |
— | — | @@ -0,0 +1,17 @@ |
| 2 | +/** |
| 3 | + * JavasSript for the Contest MediaWiki extension. |
| 4 | + * @see https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Contest |
| 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 | + $( document ).ready( function() { |
| 13 | + |
| 14 | + $( '.mw-htmlform-submit' ).button(); |
| 15 | + |
| 16 | + } ); |
| 17 | + |
| 18 | +})( window.jQuery, window.mediaWiki ); |
\ No newline at end of file |
Property changes on: trunk/extensions/Contest/resources/contest.special.submission.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 19 | + native |
Index: trunk/extensions/Contest/resources/contest.special.signup.js |
— | — | @@ -0,0 +1,17 @@ |
| 2 | +/** |
| 3 | + * JavasSript for the Contest MediaWiki extension. |
| 4 | + * @see https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:Contest |
| 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 | + $( document ).ready( function() { |
| 13 | + |
| 14 | + $( '.mw-htmlform-submit' ).button(); |
| 15 | + |
| 16 | + } ); |
| 17 | + |
| 18 | +})( window.jQuery, window.mediaWiki ); |
\ No newline at end of file |
Property changes on: trunk/extensions/Contest/resources/contest.special.signup.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 19 | + native |