From dbb645cde6a06d716c814f15a24051788f3f2d5c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 15 Sep 2007 00:53:38 +0000 Subject: [PATCH] elofgren: BUGFIX: Make adding a newsletter type to the 'Newsletters' tree work when a draft is selected by changing the name of the 'NewsletterEditForm?' back to 'EditForm?' (reverts r36734 which was a fix to make the 'Save changes' button work on the now non-existant modal 'Usaved changes' dialog.) In addition this commit reverts r37173 because the form name is now 'EditForm?' like all other forms in NewsletterAdmin?. (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41853 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/NewsletterAdmin.php | 2 +- javascript/NewsletterAdmin_left.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/NewsletterAdmin.php b/code/NewsletterAdmin.php index ac6fd15e..d1c3d8b6 100755 --- a/code/NewsletterAdmin.php +++ b/code/NewsletterAdmin.php @@ -361,7 +361,7 @@ class NewsletterAdmin extends LeftAndMain { $actions->push(new FormAction('save','Save')); - $form = new Form($this, "NewsletterEditForm", $fields, $actions); + $form = new Form($this, "EditForm", $fields, $actions); $form->loadDataFrom($email); if($email->Status != 'Draft') { diff --git a/javascript/NewsletterAdmin_left.js b/javascript/NewsletterAdmin_left.js index 6b5035ed..66e22f0e 100755 --- a/javascript/NewsletterAdmin_left.js +++ b/javascript/NewsletterAdmin_left.js @@ -295,7 +295,7 @@ AddForm.prototype = { // create a new node and add it to the site tree if( type == 'draft' ) { - $('sitetree').addDraftNode('New draft newsletter', parentID, $('Form_NewsletterEditForm_ID').value ); + $('sitetree').addDraftNode('New draft newsletter', parentID, $('Form_EditForm_ID').value ); } else { $('sitetree').addTypeNode('New newsletter type', $('Form_EditForm_ID').value ); }