From: Marcel Werk Date: Wed, 1 Jun 2016 16:51:13 +0000 (+0200) Subject: Fixed creation of multilingual system boxes X-Git-Tag: 3.0.0_Beta_1~1544 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9d7ecd7bebe050b44937a9ba22a28dcc06af0250;p=GitHub%2FWoltLab%2FWCF.git Fixed creation of multilingual system boxes --- diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Box/Add.js b/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Box/Add.js index a0cf341d18..4ab6b63641 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Box/Add.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Acp/Ui/Box/Add.js @@ -51,10 +51,19 @@ define(['Core', 'Language', 'Ui/Dialog'], function(Core, Language, UiDialog) { event.preventDefault(); var boxType = elBySel('input[name="boxType"]:checked', content).value; - var isMultilingual = elBySel('input[name="isMultilingual"]:checked', content).value; + var isMultilingual = 0; + if (boxType !== 'system') isMultilingual = elBySel('input[name="isMultilingual"]:checked', content).value; window.location = _link.replace(/{\$boxType}/, boxType).replace(/{\$isMultilingual}/, isMultilingual); }); + + elBySelAll('input[type="radio"][name="boxType"]', content, function(element) { + element.addEventListener('change', function(event) { + elBySelAll('input[type="radio"][name="isMultilingual"]', content, function(element) { + element.disabled = (event.currentTarget.value === 'system'); + }); + }); + }); }, title: Language.get('wcf.acp.box.add') }