BUGFIX: Correct confirmation alert message when rolling back to a specific version. (from r90261) (from r96805)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102689 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-13 04:26:34 +00:00
parent 479513abd1
commit 5fb9098b4d

View File

@ -186,7 +186,13 @@
$('#Form_EditForm .Actions #Form_EditForm_action_rollback').concrete(/** @lends ss.Form_EditForm_action_rollback */{
onclick: function(e) {
// @todo i18n
return confirm("Do you really want to copy the published content to the stage site?");
var form = this.parents('form:first'), version = form.find(':input[name=Version]').val(), message = '';
if(version) {
message = "Do you really want to roll back to version #" + version + " of this page?";
} else {
message = "Do you really want to copy the published content to the stage site?";
}
return confirm(message);
}
});
});