Index: trunk/extensions/UploadWizard/UploadWizard.config.php |
— | — | @@ -75,6 +75,9 @@ |
76 | 76 | // The maximum length of the id field. |
77 | 77 | 'idFieldMaxLength' => 25, |
78 | 78 | |
| 79 | + // Initial value for the id field. |
| 80 | + 'idFieldInitialValue' => '', |
| 81 | + |
79 | 82 | // 'licenses' is a list of licenses you could possibly use elsewhere, for instance in |
80 | 83 | // licensesOwnWork or licensesThirdParty. |
81 | 84 | // It just describes what licenses go with what wikitext, and how to display them in |
Index: trunk/extensions/UploadWizard/includes/UploadWizardCampaign.php |
— | — | @@ -180,6 +180,9 @@ |
181 | 181 | 'idFieldMaxLength' => array( |
182 | 182 | 'type' => 'int', |
183 | 183 | ), |
| 184 | + 'idFieldInitialValue' => array( |
| 185 | + 'type' => 'text', |
| 186 | + ), |
184 | 187 | 'ownWorkOption' => array( |
185 | 188 | 'type' => 'radio', |
186 | 189 | 'options' => array( |
Index: trunk/extensions/UploadWizard/includes/specials/SpecialUploadWizard.php |
— | — | @@ -57,6 +57,10 @@ |
58 | 58 | $skip = in_array( $wgRequest->getText( 'skiptutorial' ), array( '1', 'true' ) ); |
59 | 59 | UploadWizardConfig::setUrlSetting( 'skipTutorial', $skip ); |
60 | 60 | } |
| 61 | + |
| 62 | + if ( $wgRequest->getCheck( 'id' ) ) { |
| 63 | + UploadWizardConfig::setUrlSetting( 'idFieldInitialValue', $wgRequest->getText( 'id' ) ); |
| 64 | + } |
61 | 65 | |
62 | 66 | $this->handleCampaign(); |
63 | 67 | |
Index: trunk/extensions/UploadWizard/UploadWizard.i18n.php |
— | — | @@ -323,6 +323,7 @@ |
324 | 324 | 'mwe-upwiz-campaign-conf-idField' => 'ID field wikitext. Example: <nowiki>{{Rijksmonument|$1}}</nowiki>. Blank to not display field:', |
325 | 325 | 'mwe-upwiz-campaign-conf-idFieldLabel' => 'ID field label text:', |
326 | 326 | 'mwe-upwiz-campaign-conf-idFieldLabelPage' => 'Page name with text for the ID field label. $1 is replaced with the language code:', |
| 327 | + 'mwe-upwiz-campaign-conf-idFieldInitialValue' => 'Initial value for the ID field.', |
327 | 328 | 'mwe-upwiz-campaign-conf-headerLabelPage' => 'Page containing text to display above the UploadWizard interface. $1 is replaced with the language code:', |
328 | 329 | 'mwe-upwiz-campaign-conf-thanksLabelPage' => 'Page containing text to display on top of the "Use" page. $1 is replaced with the language code:', |
329 | 330 | 'mwe-upwiz-campaign-conf-idFieldMaxLength' => 'Maximum length of the text in the ID field', |
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js |
— | — | @@ -217,7 +217,9 @@ |
218 | 218 | 'name': idFieldId, |
219 | 219 | 'class': 'mwe-idfield', |
220 | 220 | 'maxlength': mw.UploadWizard.config.idFieldMaxLength |
221 | | - } ); |
| 221 | + } ); |
| 222 | + |
| 223 | + _this.idFieldInput.val( mw.UploadWizard.config.idFieldInitialValue ); |
222 | 224 | |
223 | 225 | _this.$form.append( |
224 | 226 | $j( '<div class="mwe-upwiz-details-input-error"><label class="mwe-validator-error" for="' + idFieldId + '" generated="true"/></div>' ), |