Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/201594

Change subject: Fix error handling for edit workflow
......................................................................

Fix error handling for edit workflow

Using this in wrong context
Bug: T94106

Change-Id: I01873f279b3d06d2069d7445ccdd375b2299e2b7
---
M resources/ext.gather.collection.editor/CollectionEditOverlay.js
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/94/201594/1

diff --git a/resources/ext.gather.collection.editor/CollectionEditOverlay.js 
b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
index 482f6da..8ec63f8 100644
--- a/resources/ext.gather.collection.editor/CollectionEditOverlay.js
+++ b/resources/ext.gather.collection.editor/CollectionEditOverlay.js
@@ -58,6 +58,7 @@
                 */
                onSaveClick: function () {
                        var title = this.$( '.title' ).val(),
+                               self = this,
                                description = this.$( '.description' ).val();
 
                        if ( this.isTitleValid( title ) && 
this.isDescriptionValid( description ) ) {
@@ -74,7 +75,7 @@
                                                window.location.reload();
                                        } );
                                } ).fail( function ( errMsg ) {
-                                       toast.show( 
this.options.editFailedError, 'toast error' );
+                                       toast.show( 
self.options.editFailedError, 'toast error' );
                                        // Make it possible to try again.
                                        this.$( '.mw-ui-input, .save' ).prop( 
'disabled', false );
                                        schema.log( {
@@ -83,7 +84,7 @@
                                        } );
                                } );
                        } else {
-                               toast.show( this.options.editFailedError, 
'toast error' );
+                               toast.show( this.options.gr, 'toast error' );
                        }
 
                },

-- 
To view, visit https://gerrit.wikimedia.org/r/201594
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01873f279b3d06d2069d7445ccdd375b2299e2b7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to