Fixed usage of i18n within user group management
authorAlexander Ebert <ebert@woltlab.com>
Fri, 30 Sep 2011 14:40:26 +0000 (16:40 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 30 Sep 2011 14:40:26 +0000 (16:40 +0200)
wcfsetup/install/files/acp/templates/userGroupAdd.tpl
wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserGroupEditForm.class.php

index 530a4c1289aa8bda9a26c032d84806696d5cef0e..98fff66be14f3a379fddfad64e7d4cd07cd29c3c 100644 (file)
@@ -6,7 +6,7 @@
                WCF.TabMenu.init();
 
                var $availableLanguages = { {implode from=$availableLanguages key=languageID item=languageName}{@$languageID}: '{$languageName}'{/implode} };
-               var $groupNameValues = { {implode from=$groupName_i18n key=languageID item=value}'{@$languageID}': '{$value}'{/implode} };
+               var $groupNameValues = { {implode from=$i18nValues['groupName'] key=languageID item=value}'{@$languageID}': '{$value}'{/implode} };
                new WCF.MultipleLanguageInput('groupName', false, $groupNameValues, $availableLanguages);
        });
        //]]>
@@ -49,7 +49,7 @@
                        <dl{if $errorType.groupName|isset} class="formError"{/if}>
                                <dt><label for="groupName">{lang}wcf.acp.group.groupName{/lang}</label></dt>
                                <dd>
-                                       <input type="text" id="groupName" name="groupName" value="{$groupName}" class="medium" />
+                                       <input type="text" id="groupName" name="groupName" value="{$i18nPlainValues['groupName']}" class="medium" />
                                        {if $errorType.groupName|isset}
                                                <small class="innerError">
                                                        {if $errorType.groupName == 'empty'}
index 8d4eeaba7cb1377a6a80127fd9335b5101bc4d9d..94da5422c1f44bb416edea43338c259be9d0318f 100755 (executable)
@@ -179,7 +179,7 @@ class UserGroupAddForm extends AbstractOptionListForm {
        public function assignVariables() {
                parent::assignVariables();
                
-               I18nHandler::getInstance()->assignVariables(1);
+               I18nHandler::getInstance()->assignVariables();
                
                WCF::getTPL()->assign(array(
                        'groupName' => $this->groupName,
index d60fe5257851781e2221811d17e1462b8bc4356d..7441214ef012b0fc3e84004a54e31c2754c5a7ab 100755 (executable)
@@ -67,7 +67,7 @@ class UserGroupEditForm extends UserGroupAddForm {
         */
        public function readData() {
                if (!count($_POST)) {
-                       I18nHandler::getInstance()->setOptions('groupName',  $this->group->groupName, 'wcf.acp.group.group\d+');
+                       I18nHandler::getInstance()->setOptions('groupName', 1, $this->group->groupName, 'wcf.acp.group.group\d+');
                        $this->groupName = $this->group->groupName;
                        
                        // get default values
@@ -99,7 +99,7 @@ class UserGroupEditForm extends UserGroupAddForm {
                parent::assignVariables();
                
                $useRequestData = (count($_POST)) ? true : false;
-               I18nHandler::getInstance()->assignVariables(1, $useRequestData);
+               I18nHandler::getInstance()->assignVariables($useRequestData);
                
                WCF::getTPL()->assign(array(
                        'groupID' => $this->group->groupID,