From c3e5ea2fe10763c13895d5bbade1db9e45abdaa3 Mon Sep 17 00:00:00 2001 From: WMDE-Fisch Date: Wed, 18 Aug 2021 15:00:48 +0200 Subject: [PATCH] Re-add adding undocumented paramters in some cases Bug: T272487 Change-Id: I862c2802da1340d302a2a95e8e9d17bd6fd35877 --- modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js index 6b8b977bc0..a9b227e70b 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js @@ -150,6 +150,15 @@ ve.ui.MWTemplateDialog.prototype.onReplacePart = function ( removed, added ) { } else if ( shouldAddPlaceholder && !this.isNewSidebar ) { page.addPlaceholderParameter(); } + + if ( this.isNewSidebar ) { + var documentedParameters = added.getSpec().getDocumentedParameterOrder(), + undocumentedParameters = added.getSpec().getUndocumentedParameterNames(); + + if ( !documentedParameters.length || undocumentedParameters.length ) { + page.addPlaceholderParameter(); + } + } } } } else if ( reselect ) {