diff --git a/javascript/CMSMain_left.js b/javascript/CMSMain_left.js index 70937bf6..51b8cfb6 100755 --- a/javascript/CMSMain_left.js +++ b/javascript/CMSMain_left.js @@ -128,21 +128,19 @@ addpageclass.prototype = { if( !_NEW_PAGES[parentID] ) _NEW_PAGES[parentID] = 1; - + var suffix = _NEW_PAGES[parentID]++; Ajax.SubmitForm(_HANDLER_FORMS.addpage, "action_addpage", { onSuccess : Ajax.Evaluator, - onFailure : this.showAddPageError, + onFailure : function(response) { if (response.status == 403) { + alert('You cannot add that page at that location.'); + }}, extraData: '&Suffix=' + suffix }); } return false; }, - - showAddPageError: function(response) { - errorMessage(ss.i18n._t('CMSMAIN.ERRORADDINGPAGE'), response); - } }; /**