r84216 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84215‎ | r84216 | r84217 >
Date:23:52, 17 March 2011
Author:kaldari
Status:deferred
Tags:
Comment:
multifile validator fix, Bug 27232
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -241,14 +241,14 @@
242242 * check entire form for validity
243243 */
244244 // return boolean if we are ready to go.
245 - // side effect: add error text to the page for fields in an incorrect state.
 245+ // side effect: add error text to the page for fields in an incorrect state.
246246 // we must call EVERY valid() function due to side effects; do not short-circuit.
247 - valid: function() {
 247+ valid: function() {
248248 var _this = this;
249 - // at least one description -- never mind, we are disallowing removal of first description
250 - // all the descriptions -- check min & max length
 249+ // at least one description -- never mind, we are disallowing removal of first description
 250+ // all the descriptions -- check min & max length
251251
252 - // the title
 252+ // the title
253253 var titleInputValid = $j( _this.titleInput ).data( 'valid' );
254254 if ( typeof titleInputValid == 'undefined' ) {
255255 alert( "please wait, still checking the title for uniqueness..." );
@@ -257,7 +257,8 @@
258258
259259 // all other fields validated with validator js
260260 var formValid = _this.$form.valid();
261 - return titleInputValid && formValid;
 261+ var deedValid = _this.upload.deedChooser.valid();
 262+ return titleInputValid && formValid && deedValid;
262263
263264 // categories are assumed valid
264265
@@ -267,7 +268,7 @@
268269 // the date
269270
270271 // location?
271 - },
 272+ },
272273
273274
274275
@@ -281,7 +282,7 @@
282283 _this.upload.deedChooser = new mw.UploadWizardDeedChooser(
283284 _this.deedDiv,
284285 [ new mw.UploadWizardDeedOwnWork(),
285 - new mw.UploadWizardDeedThirdParty() ]
 286+ new mw.UploadWizardDeedThirdParty()]
286287 );
287288 },
288289

Status & tagging log