Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js |
— | — | @@ -181,7 +181,8 @@ |
182 | 182 | _this.idFieldInput = $j( '<input type="text" id="' + idFieldId + '" name="' + idFieldId + '" class="mwe-idfield" maxlength="15"/>' ); |
183 | 183 | |
184 | 184 | _this.$form.append( |
185 | | - $j( '<div class="mwe-upwiz-details-fieldname"></div>' ).text( mw.UploadWizard.config.idFieldLabel ), |
| 185 | + $j( '<div class="mwe-upwiz-details-input-error"><label class="mwe-validator-error" for="' + idFieldId + '" generated="true"/></div>' ), |
| 186 | + $j( '<div class="mwe-upwiz-details-fieldname"></div>' ).text( mw.UploadWizard.config.idFieldLabel ).requiredFieldLabel(), |
186 | 187 | $j( '<div class="mwe-id-field"></div>' ).append( _this.idFieldInput ) |
187 | 188 | ); |
188 | 189 | } |
— | — | @@ -253,6 +254,15 @@ |
254 | 255 | $this.data( 'open', 0 ).datepicker( 'hide' ); |
255 | 256 | } |
256 | 257 | } ); |
| 258 | + |
| 259 | + if ( mw.UploadWizard.config.idField != '' ) { |
| 260 | + _this.idFieldInput.rules( "add", { |
| 261 | + required: true, |
| 262 | + messages: { |
| 263 | + required: gM( 'mwe-upwiz-error-blank' ) |
| 264 | + } |
| 265 | + } ); |
| 266 | + } |
257 | 267 | |
258 | 268 | mw.UploadWizardUtil.makeToggler( moreDetailsCtrlDiv, moreDetailsDiv ); |
259 | 269 | |