Fix boolean options on UserGroupOptionForm
authorMatthias Schmidt <gravatronics@live.com>
Thu, 25 Aug 2016 16:04:22 +0000 (18:04 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 25 Aug 2016 16:04:27 +0000 (18:04 +0200)
Fix #2093

wcfsetup/install/files/acp/templates/userGroupBooleanOptionType.tpl
wcfsetup/install/files/acp/templates/userGroupOption.tpl

index ccb11efc5a06cf0142261e1e4f50ba009c84c123..bdbf79db1a5270e2d1962942db34dcde642c346b 100644 (file)
@@ -1,4 +1,4 @@
-<ol class="flexibleButtonGroup">
+<ol class="flexibleButtonGroup optionTypeBoolean">
        <li>
                <input type="radio" id="{$option->optionName}"{if $value == 1} checked{/if} name="values[{$option->optionName}]" value="1"{if $disableOptions || $enableOptions} class="jsEnablesOptions" data-is-boolean="true" data-disable-options="[ {@$disableOptions}]" data-enable-options="[ {@$enableOptions}]"{/if}>
                <label for="{$option->optionName}" class="green"><span class="icon icon16 fa-check"></span> {lang}wcf.acp.option.type.boolean.yes{/lang}</label>
index 16538879255c7e1b77aa2de09d5fc1aef0c80e2c..8cf0c51d3b3514322c1619ace69dd6795aa2e61c 100644 (file)
@@ -24,7 +24,7 @@
                                                inputElement.name = 'values[' + groupId + ']' + (inputElement.name.slice(-2) === '[]' ? '[]' : '');
                                                
                                                if (isBoolean) {
-                                                       inputElement.checked = (inputElement.getAttribute('checked') === 'checked');
+                                                       inputElement.checked = inputElement.hasAttribute('checked');
                                                        id += '_' + groupId;
                                                        label.removeAttribute('for');
                                                        inputElement.nextElementSibling.setAttribute('for', id);