r96848 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96847‎ | r96848 | r96849 >
Date:15:01, 12 September 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r96823
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.UploadWizardDeed.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/UploadWizard/resources/mw.UploadWizardDeed.js
@@ -103,7 +103,13 @@
104104 // XXX do we need to escape authorInput, or is wikitext a feature here?
105105 // what about scripts?
106106 getAuthorWikiText: function() {
107 - return "[[User:" + mw.config.get( 'wgUserName' ) + '|' + $j( _this.authorInput ).val() + ']]';
 107+ var author = $j( _this.authorInput ).val();
 108+
 109+ if ( author === '' ) {
 110+ author = _this.$authorInput2.val();
 111+ }
 112+
 113+ return "[[User:" + mw.config.get( 'wgUserName' ) + '|' + author + ']]';
108114 },
109115
110116
@@ -112,12 +118,12 @@
113119
114120 _this.$form = $j( '<form />' );
115121
116 - var $authorInput2 = $j( '<input type="text" />' ).attr( { name: "author2" } ).addClass( 'mwe-upwiz-sign' );
 122+ _this.$authorInput2 = $j( '<input type="text" />' ).attr( { name: "author2" } ).addClass( 'mwe-upwiz-sign' );
117123 var $standardDiv = $j( '<div />' ).append(
118124 $j( '<label for="author2" generated="true" class="mwe-validator-error" style="display:block;" />' ),
119125 $j( '<p></p>' ).msg( 'mwe-upwiz-source-ownwork-assert',
120126 uploadCount,
121 - $authorInput2 ),
 127+ _this.$authorInput2 ),
122128 $j( '<p class="mwe-small-print"></p>' ).msg(
123129 'mwe-upwiz-source-ownwork-assert-note',
124130 gM( 'mwe-upwiz-license-' + mw.UploadWizard.config.licensesOwnWork.defaults[0] )

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96823fix bug 30762jeroendedauw01:15, 12 September 2011

Status & tagging log