Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js |
— | — | @@ -241,14 +241,14 @@ |
242 | 242 | * check entire form for validity |
243 | 243 | */ |
244 | 244 | // 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. |
246 | 246 | // we must call EVERY valid() function due to side effects; do not short-circuit. |
247 | | - valid: function() { |
| 247 | + valid: function() { |
248 | 248 | 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 |
251 | 251 | |
252 | | - // the title |
| 252 | + // the title |
253 | 253 | var titleInputValid = $j( _this.titleInput ).data( 'valid' ); |
254 | 254 | if ( typeof titleInputValid == 'undefined' ) { |
255 | 255 | alert( "please wait, still checking the title for uniqueness..." ); |
— | — | @@ -257,7 +257,8 @@ |
258 | 258 | |
259 | 259 | // all other fields validated with validator js |
260 | 260 | var formValid = _this.$form.valid(); |
261 | | - return titleInputValid && formValid; |
| 261 | + var deedValid = _this.upload.deedChooser.valid(); |
| 262 | + return titleInputValid && formValid && deedValid; |
262 | 263 | |
263 | 264 | // categories are assumed valid |
264 | 265 | |
— | — | @@ -267,7 +268,7 @@ |
268 | 269 | // the date |
269 | 270 | |
270 | 271 | // location? |
271 | | - }, |
| 272 | + }, |
272 | 273 | |
273 | 274 | |
274 | 275 | |
— | — | @@ -281,7 +282,7 @@ |
282 | 283 | _this.upload.deedChooser = new mw.UploadWizardDeedChooser( |
283 | 284 | _this.deedDiv, |
284 | 285 | [ new mw.UploadWizardDeedOwnWork(), |
285 | | - new mw.UploadWizardDeedThirdParty() ] |
| 286 | + new mw.UploadWizardDeedThirdParty()] |
286 | 287 | ); |
287 | 288 | }, |
288 | 289 | |