From: Alexander Ebert Date: Tue, 21 Aug 2012 15:06:15 +0000 (+0200) Subject: Added some labels for better usability X-Git-Tag: 2.0.0_Beta_1~880^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1961d8b6d20e987f7d40749cc52fa0375c8f8fe7;p=GitHub%2FWoltLab%2FWCF.git Added some labels for better usability --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index d83d14f3ad..3256d72c53 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -678,13 +678,17 @@ WCF.ACP.Options.Group = Class.extend({ init: function(canEditEveryone) { // disable 'Everyone' input this._canEditEveryone = (canEditEveryone === true) ? true : false; - var $defaultValue = $('#defaultValueContainer').find('input, textarea').removeAttr('id').removeAttr('name'); + var $defaultContainer = $('#defaultValueContainer'); + var $defaultValue = $defaultContainer.find('input, textarea').attr('id', 'optionValue' + $defaultContainer.children('dl').data('groupID')).removeAttr('name'); if (!this._canEditEveryone) { $defaultValue.attr('disabled', 'disabled'); } - // remove id and name-attribute from input elements - $('#otherValueContainer').find('input, textarea').removeAttr('id').removeAttr('name'); + // fix id and remove name-attribute from input elements + $('#otherValueContainer > dl').each(function(index, container) { + var $container = $(container); + $container.find('input, textarea').removeAttr('name').attr('id', 'optionValue' + $container.data('groupID')); + }); // bind event listener $('#submitButton').click($.proxy(this._click, this)); diff --git a/wcfsetup/install/files/acp/templates/userGroupOption.tpl b/wcfsetup/install/files/acp/templates/userGroupOption.tpl index 2bc78ec35e..538ac87271 100644 --- a/wcfsetup/install/files/acp/templates/userGroupOption.tpl +++ b/wcfsetup/install/files/acp/templates/userGroupOption.tpl @@ -3,7 +3,7 @@ @@ -23,7 +23,7 @@ {lang}wcf.acp.group.option.defaultValue{/lang}
-
{lang}{$groupEveryone->groupName}{/lang}
+
{@$defaultFormElement}
@@ -33,7 +33,7 @@ {foreach from=$groups item=group}
-
{lang}{$group->groupName}{/lang}
+
{@$formElements[$group->groupID]}
{/foreach}