From 5c97a59a5c23adc1735aedabd3582abdd6777884 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 18 Nov 2008 03:04:31 +0000 Subject: [PATCH] BUGFIX Disabled js code in CMSMain->switchlanguage() which was assuming wrong DOM structure (TODO: Replace with more robust selectors) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66136 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index 9962b412..ff452571 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -1304,13 +1304,13 @@ HTML; $languageIDs = $obj->getDescendantIDList(); $notcreatedlist = array_diff($allIDs,$languageIDs); FormResponse::add("$('addpage').getElementsByTagName('button')[0].disabled=true;"); - FormResponse::add("$('Form_AddPageOptionsForm').getElementsByTagName('div')[1].getElementsByTagName('input')[0].disabled=true;"); + //FormResponse::add("$('Form_AddPageOptionsForm').getElementsByTagName('div')[1].getElementsByTagName('input')[0].disabled=true;"); FormResponse::add("$('Translating_Message').innerHTML = 'Translating mode - ".i18n::get_language_name($lang)."';"); FormResponse::add("Element.removeClassName('Translating_Message','nonTranslating');"); } else { Translatable::set_reading_lang($lang); FormResponse::add("$('addpage').getElementsByTagName('button')[0].disabled=false;"); - FormResponse::add("$('Form_AddPageOptionsForm').getElementsByTagName('div')[1].getElementsByTagName('input')[0].disabled=false;"); + //FormResponse::add("$('Form_AddPageOptionsForm').getElementsByTagName('div')[1].getElementsByTagName('input')[0].disabled=false;"); FormResponse::add("Element.addClassName('Translating_Message','nonTranslating');"); } $obj = singleton($this->stat('tree_class'));