jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/335597 )
Change subject: Disable tokens field editing for existing values only ...................................................................... Disable tokens field editing for existing values only Change-Id: I52a723949079b5436180234dd670d39c3b041334 --- M libs/ext.pf.select2.tokens.js 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/libs/ext.pf.select2.tokens.js b/libs/ext.pf.select2.tokens.js index 00bd009..155b0dc 100644 --- a/libs/ext.pf.select2.tokens.js +++ b/libs/ext.pf.select2.tokens.js @@ -49,7 +49,9 @@ this.sortable(element); element.on( "change", this.onChange ); element.val(cur_val); - element.parent().on( "dblclick", "li.select2-search-choice", pfTokensTurnIntoInput ); + if ( element.attr( "existingvaluesonly" ) !== "true" ) { + element.parent().on( "dblclick", "li.select2-search-choice", pfTokensTurnIntoInput ); + } }; /* * Returns options to be set by select2 -- To view, visit https://gerrit.wikimedia.org/r/335597 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52a723949079b5436180234dd670d39c3b041334 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageForms Gerrit-Branch: master Gerrit-Owner: Cicalese <cical...@mitre.org> Gerrit-Reviewer: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits