From 85373bcb9ac31eec0290ac0946357a6b48ce8fcb Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Wed, 25 Feb 2015 02:12:28 +0000 Subject: [PATCH] Check whether template is altered before allowing apply Again. Originally done in I5a664f86, the crucial part of which was reversed in I1500f480. Bug: T89913 Change-Id: I39b0cdcdb5f76fa75f506c874ef6223d8d8d53e6 --- modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js index 66eda5db91..61b741dec8 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js @@ -254,7 +254,7 @@ ve.ui.MWTemplateDialog.prototype.setApplicableStatus = function () { var parts = this.transclusionModel && this.transclusionModel.getParts(); if ( parts.length && !( parts[0] instanceof ve.dm.MWTemplatePlaceholderModel ) ) { - this.actions.setAbilities( { apply: true, insert: true } ); + this.actions.setAbilities( { apply: this.altered, insert: true } ); } else { // Loading is resolved. We have either: 1) no parts, or 2) the a placeholder as the first part this.actions.setAbilities( { apply: parts.length === 0 && this.altered, insert: false } );