Santhosh has uploaded a new change for review.

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

Change subject: If source selector is prefilled, initiate validations
......................................................................

If source selector is prefilled, initiate validations

Bug: T85906
Change-Id: I421c6b34bb5e862f6a293200c1888d182c793f1a
---
M modules/source/ext.cx.source.selector.js
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/06/183006/1

diff --git a/modules/source/ext.cx.source.selector.js 
b/modules/source/ext.cx.source.selector.js
index a601b03..e32fe72 100644
--- a/modules/source/ext.cx.source.selector.js
+++ b/modules/source/ext.cx.source.selector.js
@@ -94,12 +94,18 @@
 
                if ( this.options.sourceTitle ) {
                        this.$sourceTitleInput.val( this.options.sourceTitle 
).trigger( 'input' );
-                       this.show();
                }
 
                if ( this.options.targetTitle ) {
                        this.$targetTitleInput.val( this.options.targetTitle 
).trigger( 'input' );
                }
+               // If All values are present, show the dialog and initiate a 
validation.
+               if ( this.options.sourceLanguage && this.options.targetLanguage 
&&
+                       this.options.sourceTitle && this.options.targetTitle
+               ) {
+                       this.show();
+                       this.check();
+               }
        };
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I421c6b34bb5e862f6a293200c1888d182c793f1a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to