http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96823
Revision: 96823
Author: jeroendedauw
Date: 2011-09-12 01:15:45 +0000 (Mon, 12 Sep 2011)
Log Message:
-----------
fix bug 30762
Modified Paths:
--------------
trunk/extensions/UploadWizard/resources/mw.UploadWizardDeed.js
Modified: trunk/extensions/UploadWizard/resources/mw.UploadWizardDeed.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.UploadWizardDeed.js
2011-09-12 00:12:10 UTC (rev 96822)
+++ trunk/extensions/UploadWizard/resources/mw.UploadWizardDeed.js
2011-09-12 01:15:45 UTC (rev 96823)
@@ -103,7 +103,13 @@
// XXX do we need to escape authorInput, or is wikitext a
feature here?
// what about scripts?
getAuthorWikiText: function() {
- return "[[User:" + mw.config.get( 'wgUserName' ) + '|'
+ $j( _this.authorInput ).val() + ']]';
+ var author = $j( _this.authorInput ).val();
+
+ if ( author === '' ) {
+ author = _this.$authorInput2.val();
+ }
+
+ return "[[User:" + mw.config.get( 'wgUserName' ) + '|'
+ author + ']]';
},
@@ -112,12 +118,12 @@
_this.$form = $j( '<form />' );
- var $authorInput2 = $j( '<input type="text" />' ).attr(
{ name: "author2" } ).addClass( 'mwe-upwiz-sign' );
+ _this.$authorInput2 = $j( '<input type="text" />'
).attr( { name: "author2" } ).addClass( 'mwe-upwiz-sign' );
var $standardDiv = $j( '<div />' ).append(
$j( '<label for="author2" generated="true"
class="mwe-validator-error" style="display:block;" />' ),
$j( '<p></p>' ).msg(
'mwe-upwiz-source-ownwork-assert',
uploadCount,
- $authorInput2 ),
+ _this.$authorInput2 ),
$j( '<p class="mwe-small-print"></p>' ).msg(
'mwe-upwiz-source-ownwork-assert-note',
gM( 'mwe-upwiz-license-' +
mw.UploadWizard.config.licensesOwnWork.defaults[0] )
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs