From f51448ced4fd566a5b81f0b063eb1559ab054d11 Mon Sep 17 00:00:00 2001 From: Loz Calver Date: Tue, 14 May 2013 15:38:07 +0100 Subject: [PATCH] FIX 'Add new' page button missing ParentID Slight typo causing this. Also slightly amended how extra URL parameters are tagged on to prevent &undefined being appended to URL --- javascript/CMSMain.AddForm.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/javascript/CMSMain.AddForm.js b/javascript/CMSMain.AddForm.js index 03e66e52..08e62d6b 100644 --- a/javascript/CMSMain.AddForm.js +++ b/javascript/CMSMain.AddForm.js @@ -99,8 +99,9 @@ } var data = {selector: this.data('targetPanel'),pjax: this.data('pjax')}, url; - if(parentID) { - url = $.path.addSearchParams(ss.i18n.sprintf(this.data('urlAddpage'), parentId), this.data('extraParams')); + if(parentId) { + extraParams = this.data('extraParams') ? this.data('extraParams') : ''; + url = $.path.addSearchParams(ss.i18n.sprintf(this.data('urlAddpage'), parentId), extraParams); } else { url = this.attr('href'); }