From 0f414ba9bf95f0985d543f8207860c4961eaaa70 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 3 Jan 2012 17:00:09 +0100 Subject: [PATCH] Added flexible template for i18n Credits go to @Gravatronics. Closes #318 --- .../acp/templates/multipleLanguageInputJavascript.tpl | 10 ++++++++++ .../files/lib/system/language/I18nHandler.class.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 wcfsetup/install/files/acp/templates/multipleLanguageInputJavascript.tpl diff --git a/wcfsetup/install/files/acp/templates/multipleLanguageInputJavascript.tpl b/wcfsetup/install/files/acp/templates/multipleLanguageInputJavascript.tpl new file mode 100644 index 0000000000..2a4a32a834 --- /dev/null +++ b/wcfsetup/install/files/acp/templates/multipleLanguageInputJavascript.tpl @@ -0,0 +1,10 @@ +{if !$forceSelection|isset}{assign var=forceSelection value=false}{/if} + \ No newline at end of file diff --git a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php index 504b541891..77de974916 100644 --- a/wcfsetup/install/files/lib/system/language/I18nHandler.class.php +++ b/wcfsetup/install/files/lib/system/language/I18nHandler.class.php @@ -124,7 +124,7 @@ class I18nHandler extends SingletonFactory { * @param boolean $requireI18n * @return boolean */ - public function validateValue($elementID, $requireI18n) { + public function validateValue($elementID, $requireI18n = false) { if ($this->isPlainValue($elementID)) { if ($requireI18n || $this->getValue($elementID) == '') { return false; -- 2.20.1