http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96154

Revision: 96154
Author:   catrope
Date:     2011-09-02 22:08:19 +0000 (Fri, 02 Sep 2011)
Log Message:
-----------
1.17wmf1: MFT r96103

Modified Paths:
--------------
    branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.config.php
    branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.i18n.php
    
branches/wmf/1.17wmf1/extensions/UploadWizard/includes/UploadWizardCampaign.php
    
branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.UploadWizardDetails.js

Modified: branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.config.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.config.php       
2011-09-02 22:08:16 UTC (rev 96153)
+++ branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.config.php       
2011-09-02 22:08:19 UTC (rev 96154)
@@ -65,6 +65,9 @@
        // Overrides idFieldLabel when set. $1 is replaced by the language code.
        'idFieldLabelPage' => '',
 
+       // The maximum length of the id field.
+       'idFieldMaxLength' => 25,
+
        // 'licenses' is a list of licenses you could possibly use elsewhere, 
for instance in 
        // licensesOwnWork or licensesThirdParty.
        // It just describes what licenses go with what wikitext, and how to 
display them in 

Modified: branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.i18n.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.i18n.php 
2011-09-02 22:08:16 UTC (rev 96153)
+++ branches/wmf/1.17wmf1/extensions/UploadWizard/UploadWizard.i18n.php 
2011-09-02 22:08:19 UTC (rev 96154)
@@ -338,6 +338,7 @@
        'mwe-upwiz-campaign-conf-idFieldLabelPage' => 'Page name with text for 
the ID field label. $1 is replaced with the language code:',
        'mwe-upwiz-campaign-conf-headerLabelPage' => 'Page containing text to 
display above the UploadWizard interface. $1 is replaced with the language 
code:',
        'mwe-upwiz-campaign-conf-thanksLabelPage' => 'Page containing text to 
display on top of the "Use" page. $1 is replaced with the language code:',
+       'mwe-upwiz-campaign-conf-idFieldMaxLength' => 'Maximum length of the 
text in the ID field',
 
        // Coolcats
        'mw-coolcats-confirm-new-title' => 'Confirm new category',

Modified: 
branches/wmf/1.17wmf1/extensions/UploadWizard/includes/UploadWizardCampaign.php
===================================================================
--- 
branches/wmf/1.17wmf1/extensions/UploadWizard/includes/UploadWizardCampaign.php 
    2011-09-02 22:08:16 UTC (rev 96153)
+++ 
branches/wmf/1.17wmf1/extensions/UploadWizard/includes/UploadWizardCampaign.php 
    2011-09-02 22:08:19 UTC (rev 96154)
@@ -177,7 +177,10 @@
                        'idFieldLabelPage' => array(
                                'type' => 'text',
                        ),
-                       'ownWorkOption' => array( 
+                       'idFieldMaxLength' => array(
+                               'type' => 'int',
+                       ),
+                       'ownWorkOption' => array(
                                'type' => 'radio',
                                'options' => array( 
                                        wfMsg( 
'mwe-upwiz-campaign-owner-choice' ) => 'choice',

Modified: 
branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
===================================================================
--- 
branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
   2011-09-02 22:08:16 UTC (rev 96153)
+++ 
branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
   2011-09-02 22:08:19 UTC (rev 96154)
@@ -178,7 +178,13 @@
        
        if ( mw.UploadWizard.config.idField != '' ) {
                var idFieldId = "idField" + ( _this.upload.index ).toString();
-               _this.idFieldInput = $j( '<input type="text" id="' + idFieldId 
+ '" name="' + idFieldId + '" class="mwe-idfield" maxlength="15"/>' );
+               _this.idFieldInput = $j( '<input />' ).attr( {
+                       'type': 'text',
+                       'id': idFieldId,
+                       'name': idFieldId,
+                       'class': 'mwe-idfield',
+                       'maxlength': mw.UploadWizard.config.idFieldMaxLength
+               } ); 
                
                _this.$form.append(
                        $j( '<div class="mwe-upwiz-details-input-error"><label 
class="mwe-validator-error" for="' + idFieldId + '" generated="true"/></div>' ),


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to