r87760 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87759‎ | r87760 | r87761 >
Date:19:23, 9 May 2011
Author:neilk
Status:ok
Tags:
Comment:
followup to r87747 - look for labels for id, not name
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js
@@ -741,14 +741,14 @@
742742
743743 /**
744744 * Create a recoverable error -- show the form again, and highlight the problematic field. Go to error state but do not block submission
745 - * @param {String} name of field
 745+ * @param {String} id of input field -- presumed to be within this upload's details form.
746746 * @param {String} error message to show
747747 */
748 - recoverFromError: function( fieldname, errorMessage ) {
 748+ recoverFromError: function( fieldId, errorMessage ) {
749749 this.upload.state = 'error';
750750 this.dataDiv.morphCrossfade( '.detailsForm' );
751 - this.$form.find( '[name=' + fieldname + ']' ).addClass( 'mwe-error' );
752 - this.$form.find( 'label[for=' + fieldname + '].errorRecovery' ).html( errorMessage ).show();
 751+ $j( '#' + fieldId ).addClass( 'mwe-error' );
 752+ this.$form.find( 'label[for=' + fieldId + '].errorRecovery' ).html( errorMessage ).show();
753753 },
754754
755755 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87747error recovery on filename errorsneilk17:42, 9 May 2011

Status & tagging log