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
This commit is contained in:
Alex Monk 2015-02-25 02:12:28 +00:00
parent 1960cc7406
commit 85373bcb9a

View file

@ -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 } );