Index: trunk/extensions/Contest/Contest.i18n.php |
— | — | @@ -191,6 +191,7 @@ |
192 | 192 | 'contest-mycontests-finished-text' => 'These are the passed contests you have participated in.', |
193 | 193 | 'contest-mycontests-header-contest' => 'Contest', |
194 | 194 | 'contest-mycontests-header-challenge' => 'Challenge', |
| 195 | + 'contest-mycontests-signup-success' => 'You have successfully signed up for this contest.', |
195 | 196 | |
196 | 197 | 'contest-submission-submit' => 'Submit', |
197 | 198 | 'contest-submission-unknown' => 'There is no contest with the provided name.', |
Index: trunk/extensions/Contest/specials/SpecialMyContests.php |
— | — | @@ -235,6 +235,11 @@ |
236 | 236 | * @param ContestContestant $contestant |
237 | 237 | */ |
238 | 238 | protected function showSubmissionPage( ContestContestant $contestant ) { |
| 239 | + // TODO: redirects with fragment apparenelt don't work - need other solution here |
| 240 | + if ( $this->getTitle()->getFragment() == 'new' ) { |
| 241 | + $this->showSuccess( 'contest-mycontests-signup-success' ); |
| 242 | + } |
| 243 | + |
239 | 244 | $this->getOutput()->setPageTitle( $contestant->getContest()->getField( 'name' ) ); |
240 | 245 | $this->getOutput()->addWikiMsg( 'contest-submission-header', $contestant->getContest()->getField( 'name' ) ); |
241 | 246 | |
Index: trunk/extensions/Contest/specials/SpecialContestPage.php |
— | — | @@ -86,6 +86,19 @@ |
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
| 90 | + * Show a message in a success box. |
| 91 | + * |
| 92 | + * @since 0.1 |
| 93 | + * |
| 94 | + * @param string $message |
| 95 | + */ |
| 96 | + protected function showSuccess( $message ) { |
| 97 | + $this->getOutput()->addHTML( |
| 98 | + '<div class="successbox"><strong><p>' . wfMsgExt( $message, 'parseinline' ) . '</p></strong></div>' |
| 99 | + ); |
| 100 | + } |
| 101 | + |
| 102 | + /** |
90 | 103 | * Get an array of navigation links. |
91 | 104 | * |
92 | 105 | * @param string $contestName |
Index: trunk/extensions/Contest/specials/SpecialContestSignup.php |
— | — | @@ -178,7 +178,8 @@ |
179 | 179 | * @param Contest $contest |
180 | 180 | */ |
181 | 181 | protected function showSucess( Contest $contest ) { |
182 | | - $this->getOutput()->redirect( SpecialPage::getTitleFor( 'MyContests', $contest->getField( 'name' ) )->getLocalURL() ); |
| 182 | + // TODO: insert something here so the mycontests page can identiy it's a signup and show a success message |
| 183 | + $this->getOutput()->redirect( SpecialPage::getTitleFor( 'MyContests', $contest->getField( 'name' ) ) ); |
183 | 184 | } |
184 | 185 | |
185 | 186 | /** |