Cicalese has uploaded a new change for review. ( 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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms refs/changes/97/335597/1 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: newchange Gerrit-Change-Id: I52a723949079b5436180234dd670d39c3b041334 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageForms Gerrit-Branch: master Gerrit-Owner: Cicalese <cical...@mitre.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits