From 91afab6ed12b3d15b160f3e57bfeb1c503df21dc Mon Sep 17 00:00:00 2001 From: Ruud Arentsen Date: Thu, 26 Jul 2012 15:06:42 +0200 Subject: [PATCH] fixed editing translated siteconfigs fixed editings translated configs, and added a link for the 'add translation' not working for siteconfigs --- code/model/Translatable.php | 11 ++++++++++- javascript/CMSMain.Translatable.js | 11 +++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/code/model/Translatable.php b/code/model/Translatable.php index 02154c7..6e3e052 100755 --- a/code/model/Translatable.php +++ b/code/model/Translatable.php @@ -241,6 +241,9 @@ class Translatable extends DataExtension implements PermissionProvider { if((isset($_GET['locale']) && !$langsAvailable) || (isset($_GET['locale']) && in_array($_GET['locale'], $langsAvailable))) { // get from GET parameter self::set_current_locale($_GET['locale']); + } else if((isset($_POST['Locale']) && !$langsAvailable) || (isset($_POST['Locale']) && in_array($_POST['Locale'], $langsAvailable))) { + // get from POST parameter + self::set_current_locale($_POST['Locale']); } else { self::set_current_locale(self::default_locale()); } @@ -933,7 +936,13 @@ class Translatable extends DataExtension implements PermissionProvider { $existingTransHTML = '