Index: trunk/extensions/UploadWizard/UploadWizard.config.php |
— | — | @@ -31,6 +31,11 @@ |
32 | 32 | // $1 is replaced by the language code. |
33 | 33 | 'headerLabelPage' => '', |
34 | 34 | |
| 35 | + // Page containing the (wiki)text to display on top of the "use" page. |
| 36 | + // $1 is replaced by the language code. |
| 37 | + // When not provided, the message mwe-upwiz-thanks-intro will be used. |
| 38 | + 'thanksLabelPage' => '', |
| 39 | + |
35 | 40 | // Should the own work option be shown, and if not, what option should be set? |
36 | 41 | // Possible values: choice, own, notown |
37 | 42 | 'ownWorkOption' => 'choice', |
Index: trunk/extensions/UploadWizard/includes/specials/SpecialUploadWizard.php |
— | — | @@ -139,6 +139,8 @@ |
140 | 140 | $config['idFieldLabel'] = $labelPageContent; |
141 | 141 | } |
142 | 142 | |
| 143 | + $config['thanksLabel'] = $this->getPageContent( $config['thanksLabelPage'], true ); |
| 144 | + |
143 | 145 | $wgOut->addScript( |
144 | 146 | Skin::makeVariablesScript( |
145 | 147 | array( |
— | — | @@ -159,10 +161,11 @@ |
160 | 162 | * @since 1.2 |
161 | 163 | * |
162 | 164 | * @param string $pageName |
| 165 | + * @param boolean $parse |
163 | 166 | * |
164 | 167 | * @return string|false |
165 | 168 | */ |
166 | | - protected function getPageContent( $pageName ) { |
| 169 | + protected function getPageContent( $pageName, $parse = false ) { |
167 | 170 | $content = false; |
168 | 171 | |
169 | 172 | if ( trim( $pageName ) != '' ) { |
— | — | @@ -172,6 +175,11 @@ |
173 | 176 | if ( !is_null( $page ) && $page->exists() ) { |
174 | 177 | $article = new Article( $page, 0 ); |
175 | 178 | $content = $article->getContent(); |
| 179 | + |
| 180 | + if ( $parse ) { |
| 181 | + global $wgOut; |
| 182 | + $content = $wgOut->parse( $content ); |
| 183 | + } |
176 | 184 | } |
177 | 185 | } |
178 | 186 | |
Index: trunk/extensions/UploadWizard/includes/UploadWizardCampaign.php |
— | — | @@ -199,12 +199,15 @@ |
200 | 200 | 'type' => 'text' |
201 | 201 | ), |
202 | 202 | 'autoCategories' => array( |
203 | | - 'type' => 'text' |
| 203 | + 'type' => 'text' |
204 | 204 | ), |
205 | 205 | 'autoWikiText' => array( |
206 | 206 | 'type' => 'textarea', |
207 | 207 | 'rows' => 4 |
208 | 208 | ), |
| 209 | + 'thanksLabelPage' => array( |
| 210 | + 'type' => 'text' |
| 211 | + ), |
209 | 212 | ); |
210 | 213 | |
211 | 214 | foreach ( $globalConfig['licensesOwnWork']['licenses'] as $license ) { |
Index: trunk/extensions/UploadWizard/UploadWizard.i18n.php |
— | — | @@ -327,6 +327,7 @@ |
328 | 328 | 'mwe-upwiz-campaign-conf-idFieldLabel' => 'Id field label text', |
329 | 329 | 'mwe-upwiz-campaign-conf-idFieldLabelPage' => 'Page name with text for the id field label. $1 is replaced with the language code', |
330 | 330 | 'mwe-upwiz-campaign-conf-headerLabelPage' => 'Page containing text to display above the UploadWizard interface. $1 is replaced with the language code', |
| 331 | + 'mwe-upwiz-campaign-conf-thanksLabelPage' => 'Page containing text to display on top of the "Use" page. $1 is replaced with the language code', |
331 | 332 | |
332 | 333 | // Coolcats |
333 | 334 | 'mw-coolcats-confirm-new-title' => 'Confirm new category', |
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -1721,10 +1721,21 @@ |
1722 | 1722 | prefillThanksPage: function() { |
1723 | 1723 | var _this = this; |
1724 | 1724 | |
| 1725 | + var thnxHeader = $j( '<h3 style="text-align: center;"></h3>' ); |
| 1726 | + |
| 1727 | + if ( mw.UploadWizard.config.thanksLabel === false ) { |
| 1728 | + thnxHeader.msg( 'mwe-upwiz-thanks-intro' ); |
| 1729 | + } |
| 1730 | + else { |
| 1731 | + thnxHeader.html( mw.UploadWizard.config.thanksLabel ); |
| 1732 | + } |
| 1733 | + |
1725 | 1734 | $j( '#mwe-upwiz-thanks' ) |
1726 | | - .append( $j( '<h3 style="text-align: center;"></h3>' ).msg( 'mwe-upwiz-thanks-intro' ), |
1727 | | - $j( '<p style="margin-bottom: 2em; text-align: center;">' ) |
1728 | | - .msg( 'mwe-upwiz-thanks-explain', _this.uploads.length ) ); |
| 1735 | + .append( |
| 1736 | + thnxHeader, |
| 1737 | + $j( '<p style="margin-bottom: 2em; text-align: center;">' ) |
| 1738 | + .msg( 'mwe-upwiz-thanks-explain', _this.uploads.length ) |
| 1739 | + ); |
1729 | 1740 | |
1730 | 1741 | $j.each( _this.uploads, function(i, upload) { |
1731 | 1742 | var id = 'thanksDiv' + i; |