Index: branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.config.php |
— | — | @@ -65,6 +65,9 @@ |
66 | 66 | // Overrides idFieldLabel when set. $1 is replaced by the language code. |
67 | 67 | 'idFieldLabelPage' => '', |
68 | 68 | |
| 69 | + // The maximum length of the id field. |
| 70 | + 'idFieldMaxLength' => 25, |
| 71 | + |
69 | 72 | // 'licenses' is a list of licenses you could possibly use elsewhere, for instance in |
70 | 73 | // licensesOwnWork or licensesThirdParty. |
71 | 74 | // It just describes what licenses go with what wikitext, and how to display them in |
Index: branches/wmf/1.17wmf1/extensions/UploadWizard/includes/UploadWizardCampaign.php |
— | — | @@ -177,7 +177,10 @@ |
178 | 178 | 'idFieldLabelPage' => array( |
179 | 179 | 'type' => 'text', |
180 | 180 | ), |
181 | | - 'ownWorkOption' => array( |
| 181 | + 'idFieldMaxLength' => array( |
| 182 | + 'type' => 'int', |
| 183 | + ), |
| 184 | + 'ownWorkOption' => array( |
182 | 185 | 'type' => 'radio', |
183 | 186 | 'options' => array( |
184 | 187 | wfMsg( 'mwe-upwiz-campaign-owner-choice' ) => 'choice', |
Index: branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.i18n.php |
— | — | @@ -338,6 +338,7 @@ |
339 | 339 | 'mwe-upwiz-campaign-conf-idFieldLabelPage' => 'Page name with text for the ID field label. $1 is replaced with the language code:', |
340 | 340 | 'mwe-upwiz-campaign-conf-headerLabelPage' => 'Page containing text to display above the UploadWizard interface. $1 is replaced with the language code:', |
341 | 341 | 'mwe-upwiz-campaign-conf-thanksLabelPage' => 'Page containing text to display on top of the "Use" page. $1 is replaced with the language code:', |
| 342 | + 'mwe-upwiz-campaign-conf-idFieldMaxLength' => 'Maximum length of the text in the ID field', |
342 | 343 | |
343 | 344 | // Coolcats |
344 | 345 | 'mw-coolcats-confirm-new-title' => 'Confirm new category', |
Index: branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.UploadWizardDetails.js |
— | — | @@ -178,7 +178,13 @@ |
179 | 179 | |
180 | 180 | if ( mw.UploadWizard.config.idField != '' ) { |
181 | 181 | var idFieldId = "idField" + ( _this.upload.index ).toString(); |
182 | | - _this.idFieldInput = $j( '<input type="text" id="' + idFieldId + '" name="' + idFieldId + '" class="mwe-idfield" maxlength="15"/>' ); |
| 182 | + _this.idFieldInput = $j( '<input />' ).attr( { |
| 183 | + 'type': 'text', |
| 184 | + 'id': idFieldId, |
| 185 | + 'name': idFieldId, |
| 186 | + 'class': 'mwe-idfield', |
| 187 | + 'maxlength': mw.UploadWizard.config.idFieldMaxLength |
| 188 | + } ); |
183 | 189 | |
184 | 190 | _this.$form.append( |
185 | 191 | $j( '<div class="mwe-upwiz-details-input-error"><label class="mwe-validator-error" for="' + idFieldId + '" generated="true"/></div>' ), |